Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm trying to aggregate some geo data (longitue, latitude). I have a table like below:
Country | City | Longitude | Latitude | Sales |
France | Paris | x1 | y1 | 500 |
Germany | Berlin | x2 | y2 | 400 |
Germany | Hamburg | x3 | y3 | 100 |
France | Bordeaux | x4 | y4 | 200 |
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.
Country | Longitude | Latitude | Sales |
France | Xf | Yf | 700 |
Germany | Xg | Yg | 500 |
I tried to use GeoAggrGeometry() but it work only for area layer.
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.
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?
It does not work
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.