Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
eds_fb17
Contributor III
Contributor III

Aggr Geospatial point

Hello,

I'm trying to aggregate  some geo data (longitue, latitude). I have a table like below:

CountryCityLongitudeLatitudeSales
FranceParisx1y1500
GermanyBerlinx2y2400
GermanyHamburgx3y3100
FranceBordeauxx4y4200

 

I would like to do an aggregation and get the total of the sales per country. So i also need to aggregate the latitude and longitude in order to get 1 point per country. how could I do this? below the output table i want.

CountryLongitudeLatitudeSales
FranceXfYf700
GermanyXgYg500

 

I tried to use GeoAggrGeometry() but it work only for area layer.

Labels (2)
1 Solution

Accepted Solutions
Steven_Haught
Creator III
Creator III

@eds_fb17 

You could try GeoGetPolygonCenter(Country) to get the single point on the map. Were I going to map this I would make it a drill down though so that once  a "Country" was selected it would show me the points that make up the sales of that country. 

View solution in original post

3 Replies
Gui_Approbato
Creator III
Creator III

I believe you don't need to insert lat and long in your aggr() .

You could just insert the Country column, lat and long could be measures (average of lat and long), and then you just Sum your Sales.

Does it make sense? 

eds_fb17
Contributor III
Contributor III
Author

It does not work

Steven_Haught
Creator III
Creator III

@eds_fb17 

You could try GeoGetPolygonCenter(Country) to get the single point on the map. Were I going to map this I would make it a drill down though so that once  a "Country" was selected it would show me the points that make up the sales of that country.