1

I am new to GIS.

From what I understand a GIS layer has one or more features (of some geometric shape like Point, Multipoint, Linestring, Multi linestring, Polygon, Multi polygon and so on). I have such a layer exported in a geojson as

{"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG::3857"}},"type":"FeatureCollection","features":[{"type":"Feature","properties":{"FID":123,"TEXT":"fh","attaches":[]},"geometry":{"type":"Polygon","coordinates":[[[9716249,2699679.25],[9716249,2697386.25],[9718542,2697386.25],[9716249,2699679.25]]]}},{"type":"Feature","properties":{"FID":12345,"TEXT":"gsg","attaches":[]},"geometry":{"type":"Polygon","coordinates":[[[9718996,2701934.25],[9718095,2702668.75],[9719635,2699498],[9720694,2694714.75],[9721795,2698906.75],[9721278,2700393.75],[9718996,2701934.25]]]}},{"type":"Feature","properties":{"FID":123456,"TEXT":"xhd","attaches":[]},"geometry":{"type":"Polygon","coordinates":[[[9717095,2699714.5],[9717095,2697421.5],[9719388,2697421.5],[9717095,2699714.5]]]}}]}

What is wish to do is merge some overlapping features and make them as one. Say merge two overlapping polygons and make them as one polygon feature.

Are there any libraries/apis in Java to help me do the merging part?

I have exported this layer using the NextGIS android app.

  • I think you are looking to dissolve not merge. Merge is simply combining one to many different (like geometry) GIS layers into one. Dissolve merges/combines overlapping features within the same layer. – artwork21 Apr 18 '17 at 12:40
1

This question has been asked before.

Basically, the big library is the JTS Topology Suite.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.