How to display a million points on the map, defined by latitude and longitude.

1591
8
Jump to solution
10-16-2016 03:16 AM
TMPTMP1
New Contributor II

In swing java

Tags (4)
0 Kudos
1 Solution

Accepted Solutions
BatbayarBazarragchaa
New Contributor III

You had memory or performance issues displaying millions of points?

You can use GraphicLayer to display data with latitude and longitude.

// construct spatial reference

SpatialReference spatialReference = SpatialReference.create(102100)

// construct symbol

MarkerSymbol markerSymbol = new PictureMarkerSymbol(ImageLoader.loadImage("icons/triange_red.png"));

for (int i = 0; i < points; i++) {

   //

   Point point = GeometryEngine.project(longitude, latitude, spatialReference);
   graphicsLayer.addGraphic(new Graphic(point, markerSymbol));

}

View solution in original post

8 Replies
DanPatterson_Retired
MVP Esteemed Contributor

If you need a visual representation, can you explain how you expect them to be distinguishable from one another?

0 Kudos
TMPTMP1
New Contributor II

Something like this. 

0 Kudos
DanPatterson_Retired
MVP Esteemed Contributor

I would probably summarize the points based upon the underlying polygons, then return the centroid of that polygon with the count of the points attributed to each polygon used to symbolize the point.  I presume that the image on the right wasn't done that way in an Arc* environment?

0 Kudos
TMPTMP1
New Contributor II

No.

I try it

0 Kudos
DanPatterson_Retired
MVP Esteemed Contributor

don't know about your need to do this in your environment, but ArcMap has tools to help in the aggregation of points based on distance... Aggregate Points—Help | ArcGIS for Desktop 

AlexanderNohe1
Regular Contributor II

I moved this from the Android location to the Java location as Swing is a Java technology.

0 Kudos
BatbayarBazarragchaa
New Contributor III

You had memory or performance issues displaying millions of points?

You can use GraphicLayer to display data with latitude and longitude.

// construct spatial reference

SpatialReference spatialReference = SpatialReference.create(102100)

// construct symbol

MarkerSymbol markerSymbol = new PictureMarkerSymbol(ImageLoader.loadImage("icons/triange_red.png"));

for (int i = 0; i < points; i++) {

   //

   Point point = GeometryEngine.project(longitude, latitude, spatialReference);
   graphicsLayer.addGraphic(new Graphic(point, markerSymbol));

}

TMPTMP1
New Contributor II

Performance issue,

Thanks for your answer.

0 Kudos