Tag Info

Hot answers tagged

3

you can't really convert convert distances in degrees into meters as the size of a degree varies as you approach the poles. convert your locations into a projected coordinate system, then calculate your distances.


3

I've got use of Java and JavaScript in WEBGIS project. If you want I can send you the link to it. We've used in the project of the PostGIS and GEOTools. I hope these links help you


3

OK, my original answer was wrong (see user30184's comment). Here's another: The polygon is convex if each angle is 180 degrees or less. You can check this in O(n) time, iterating over the triples of points in the exterior ring and checking the sign of the determinant. import com.vividsolutions.jts.geom.Coordinate; import ...


3

What you're trying to do doesn't really make sense. Quadtree.query works by intersecting the extents of the elements with a rectangular extent. It's up to you to further filter them. However, you can use the overloaded version of query with a subclass of ItemVisitor to achieve what you want. public class QtreeTest { public static class HoleVisitor ...


3

I am not a Java developer and don't know of any existing Java implementations for this, but using the k-Nearest Neighbors algorithm with a k-d tree will likely give much better performance. However, if accuracy is important, you will need to implement the Haversine (spherical) or Vincenty (ellipsoidal) distance formulae for the distance metric, since ...


2

You need to cast the string to a geometry then set its SRID to match the geometry column's SRID. select id from database where point_lat_lon = st_setsrid('POINT Z (116.309627 39.991285 148)'::geometry, ST_SRID(point_lat_lon));


2

If your interested in using a microservice that you can run yourself, instead of a library check out https://github.com/trailbehind/StaticMapService/. You can install background layers into it, then post GeoJSON and get back map images. You mentioned facebook preview images, and that's exactly what I wrote it for. The image url points at a public web server, ...


1

For the ID simply pass it in to the featureBuilder instead of null; For other properties you need to modify the schema you generated the featureBuilder with. The easiest way to do this is to use DataUtilities.createType SimpleFeatureType TYPE = DataUtilities.createType("Test", "ian:String,location:Point"); final Point point = builder.point(132.159633, ...


1

The answer to your question seems to be code like: private FeatureEntry createFeatureEntry(SimpleFeatureType schema, ReferencedEnvelope bbox) { FeatureEntry ret = new FeatureEntry(); ret.setGeometryColumn(schema.getGeometryDescriptor().getLocalName()); GeometryType type = schema.getGeometryDescriptor().getType(); Geometries ...


1

Geoserver is not mandatory. If you need a WFS or WMS or WMTS or WPS or CSW or WCS server for your application needs, it is an option, but there are other options for all of those, in open source and proprietary forms. If you are looking for open source options, many are listed at OSGeo - see the project links under Web Mapping and Metadata Catalog headings. ...



Only top voted, non community-wiki answers of a minimum length are eligible