Hot answers tagged

25

I did a simple comparison a year ago showing eleven different geocoding services, free ones as well as pay services, and the results are in a google spreadsheet. I work at SmartyStreets, so you'll see that listed in the first column but not in first place. I tried to make the comparison unbiased so the results are actually useful. I have now opened the ...


14

With your background I would suggest that a .NET language using ArcObjects would be most familiar and VB.NET most familiar of all. Also, if you are looking at wider career opportunities beyond this project, then my gut feel is still with the .NET environment with a leaning towards C#, just based on the requirements I see employers asking for most often. ...


13

A few ideas come to mind for building your geospatial programming credentials: Create a legacy of solutions and answers on GISse and Stack Overflow. You will notice that many people on GISse creatively and wisely use this forum to further their freelance work. Create a web page or blog to show potential employers what you know. Some of my favorites, and ...


12

For a much more lightweight alternative to GeoTools, check out jts2geojson: GeoJSONReader reader = new GeoJSONReader(); Geometry geometry = reader.read(json);


11

Geotools as a support for geojson. See here. Otherwise, you could simply use a typical JSON parser (such as json-simple) together with the geoJSON spec, which is really easy to use. The best solution depends on what you want to do with the parsed information.


9

There is a very good web site for beginners about OpenStreetMap world focused on people coming from other mapping services that could fit your question: http://switch2osm.org/serving-tiles/ But if you want to create some tiles to be served offline something like http://www.maptiler.org/ but it's focused on raster data. If I had to do this I would probably ...


9

I think the way that we create mapping applications is changing fast and the key to success in this industry is being ahead of that curve. For example 10+ years ago when we wanted a blog we get a shared hosting solution, download a blogging platform like Wordpress or Movable Type install it on the server, buy a domain name, install a theme, bang our head ...


9

The terminology confuses me too but as far as I have understood: ArcObjects is a set components with which you can write a program to control any of the ESRI products (ArcGIS Desktop, ArcGIS Server or ArcEngine). See "What is ArcObjects?". ArcEngine is the kernel of ArcGIS without the user interface. You can't do anything with ArcEngine alone, you use it ...


8

Install OpenJUMP and study what all has been gathered into it I have never really understood what all the alternatives are. ImageIO-ext is probably utilising native GDAL binaries if such are available but at least most other alternatives are pure java. There is also one more alternative in OpenJUMP called "Sextante raster" which is also pure java. Different ...


7

You can think of QueryInterface simply as a COM type-cast. QI, or QueryInterface, is a term used by the Microsoft COM specification. The specification is a binary standard that is language agnostic (it can be implemented by various languages). From Microsoft's documentation on COM: The Microsoft Component Object Model (COM) is a platform-independent, ...


7

I would recommend a different strategy, that consists on using the Java library JTS Topology Suite, which is open source software. By using the class WKTReader you can get, for example, an instance of the MultiLineString class from the WKT you have. This class has methods to get the coordinates you need.


7

The GeoTools library supports WFS-T. By using the class org.geotools.data.wfs.WFSDataStoreFactory you can connect to a WFS service. A transaction can be created using any class that implements the interface org.geotools.data.Transaction, for instance, the class org.geotools.data.DefaultTransaction. GeoTools has also classes that will allow you to work ...


7

To parse or deserialize geojson in Java REST webservice, i prefere to use geojson-jackson , which integrate itself very nicely with jackson.


7

The short answer is you can't do that unless your points are very close together and you want the answer in degrees. JTS knows nothing about units or the curvature of the earth. So you need to pull in some GeoTools jars that do know about such things. Then you can create a method like: private void calculateDistance( ...


6

I've had the same error message on a Windows Server with GeoServer using Jetty. After some research I found the file C:\Program Files (x86)\GeoServer 2.10.1\wrapper\wrapper.conf where I edited these two lines: # Initial Java Heap Size (in MB) wrapper.java.initmemory=16 # Maximum Java Heap Size (in MB) wrapper.java.maxmemory=128 Seems to have done the ...


6

You can get it with JSTS. Check DistanceOp.js.


6

Mark's answer is great! It really helped me out. Here's a slightly modified version of Mark's code. The major difference is that this code does not rely on the java.awt.image package to compute the image size, number of bands, or pixel values. Instead, it uses the GeoTools Coverage API. import org.geotools.coverage.grid.io.GridCoverage2DReader; import org....


6

I had same problem. I solved the problem. My solution: StringBuffer tmpStr = new StringBuffer(); tmpStr.append("ID,date,tstamp,X_prj,Y_prj,NEAR_FID,NEAR_DIST\n"); SimpleFeature f = null; int index = 0; String ID = null; while(simpleFeatureIterator.hasNext()){ f = simpleFeatureIterator.next(); index = f.getID().lastIndexOf('.'); ...


6

I believe that I have found an adequate solution that meets all of my requirements. Thanks to user30184's answer, which pointed me in the direction of ImageIO, I was able to find an alternative Java imaging library called Apache Commons Imaging. It is a pure-Java library that consists of a single small JAR file. It also supports both reading and writing of ...


6

You need to import the GeoJSON plugn <dependency> <groupId>org.geotools</groupId> <artifactId>gt-geojson</artifactId> <version>${geotools.version}</version> </dependency> and then call it like this (a full example is here): public String geoData() { final GeometryBuilder builder = new ...


5

Yes, it is possible to add PL/Java: http://www.postgresql.org/docs/current/static/external-pl.html Be sure to read up on the security issues involved in adding a new procedural language to PostgreSQL.


5

Hibernate Spatial JTS - Java Topology Suite Proj4J Geolatte - Open Source GIS Components for Java Geotoolkit i hope it helps you...


5

The units of measurement is based on the underlying spatial reference. So, for example, if it is EPSG:4326 it is decimal degrees or if it EPSG:2037 it is meters.


5

I don't want to do your homework for you, but much of the framework already exists. Try looking at Script Tools. You will have to write the python script yourself, but it can very easily be run from ArcToolbox. The UI comes from the ArcGIS desktop, and has the standard look and feel.


5

I was using Tomcat, and it's connection pooling facilities. I just exposed a datasource to my application through JNDI. Here's what did work for me: When I included the maven dependency for hibernate-spatial, it has a transitive dependency for hibernate itself, postgresql's jdbc and postgis's jdbc. So what I did was to remove these dependencies (outdated). ...


5

When I manually enter a Query for ways Overpass turbo suggests an auto repair so as to also get nodes for the way. This then amounts to way(poly:"50.7 7.1 50.7 7.2 50.75 7.15")["building"]; /*added by auto repair*/ (._;>;); /*end of auto repair*/ out body; see http://overpass-turbo.eu/s/1q1 . Change out body to out ids if you really only want way IDs, ...


5

With my (limited) experience in GIS, I can't recommend you to start such a big task while having very limited amount of time. This might provoke bad solutions and underestimates the amount of small problems with integrating different FLOSS solutions. After this warning I will try to answer: First thing is that you shall not store a whole planet dataset on ...


5

GeoTools provides a GeoJSON module which will read in GeoJSON files and convert them to GeoTools Feature Collections - the geometry elements of these collections is stored as a JTS object. So all you need is Geometry geom = (Geometry) feature.getDefaultGeometry();


5

Another alternative is GeoGson, which is built on top of Google's Gson: Geometry geometry = new GsonBuilder() .registerTypeAdapterFactory(new GeometryAdapterFactory()) .create() .fromJson("{\"type\":\"Point\",\"coordinates\": [23.5,20.125]}");


5

I guess you have gdal and the bindings installed, and some coding ability, so I'll just provide an outline: import org.gdal.gdal.gdal; import org.gdal.gdal.Band; import org.gdal.gdal.Dataset; ... Dataset dataset = gdal.Open(filename); Band band = dataset.GetRasterBand(1); ... // Do some band operation, like band.ReadRaster() to get the data, whatever you ...


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