Tag Info

Hot answers tagged

10

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 ...


5

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 ...


4

I've created a while ago a method to draw points on a layer from geotagged flickr pictures. It shows basically how to create a FeatureLayer with custom points public Layer getFlickrLayer(){ SimpleFeatureTypeBuilder b = new SimpleFeatureTypeBuilder(); b.setName( "pictures" ); b.setCRS( DefaultGeographicCRS.WGS84 ); //picture location ...


4

Is this what you're after? http://weblogs.java.net/blog/cajo/archive/2010/10/16/adding-google-maps-your-java-application You can also use Bing maps with Java, also worth looking at GeoTools NASA Worldwind OpenMap There's also a useful list of OpenSource Java GIS software here: http://java-source.net/open-source/geospatial


4

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.


3

An Oblique Mercator will have near-zero distortion along a great circle of contact; that excludes all circles of latitude (except the Equator). Projections that minimize distortion along circles of latitude tend to be derived from conic projections and their limiting forms, cylindrical projections. The conic projections are usually good only for ...


3

You could use the JTS WKTWriter to convert geometries read in from the Shapefile to WKT and then save the strings to a file the user chose. Reading in a Shapefile and accessing the geometries are covered in the CRS tutorial.


2

I encountered a similar problem to what you describe, and found the source of the problem after some code inspection. The main problem is that during the addFeatures call, a CopyOnWriteArrayList is used at some point to store all features that are to be written. (This is regardless if you add your features one at a time, or in batches.) This list ...


2

Browsing one of the given links a couple of times over and trying with a different file, I realised that the I did need to alter the: CoordinateReferenceSystem WGS = CRS.decode("EPSG:4326"); CoordinateReferenceSystem lambert = CRS.decode("EPSG:31300"); to: CoordinateReferenceSystem WGS = CRS.decode("EPSG:4326",true); CoordinateReferenceSystem lambert = ...


2

I am not a Java expert but I do know that Java supports subprocesses, so you could do the sort of thing I'd do in Python as follows. Write a simple loop to iterate over your shapefiles For each shapefile, spawn a subprocess to call ogr2ogr to dump the shapefile in one go into PostGIS without having to create a dump file first Rinse and repeat GDAL/OGR ...


2

geoserver for serving server side data. You create a store in geoserver for POSTGIS or any other database. Since you are using java you could probably use JSF or any other framework or neither. Just setup TOMCAT or whatever server(or may be you could deploy geoserver and your application in same server) and write simple html pages(depends on point 4). Take ...


1

but I am concerned with my lack of experience. I feel I would be more of a hindrance than a benefit. My expirience is that Open Source communities does not look at things this way at all. While your Java experience might not exactly meet the standards of the project, there are always tasks to be done. Mundane tasks like filing bugs, testing etc are ...


1

I have followed the resource pointed out by @iant and.. Here's the solution: public static void toShp(File geojson) throws IOException { File shpFile = new File("test.shp"); ShapefileDataStoreFactory dataStoreFactory = new ShapefileDataStoreFactory(); Map<String, Serializable> params = new HashMap<String, Serializable>(); ...


1

I don't think there is a precanned example of this but you should be able to work out the basics from the cvs to shapefile example here. There is an unsupported GeoJSON module that should also be of help.


1

Not absolutely clear what you are trying to do, but you may want to take a look at ST_Equals, ST_Difference functions. http://postgis.net/docs/manual-2.0/ST_Difference.html http://postgis.net/docs/manual-2.0/ST_OrderingEquals.html (if you expect things to be more or less exact) http://postgis.net/docs/manual-2.0/ST_Equals.html Then you do a join ...


1

If you are seeing individual commits then you have your transaction set wrong - try something like: Transaction transaction = new DefaultTransaction("create"); String typeName = newDataStore.getTypeNames()[0]; SimpleFeatureSource featureSource = newDataStore.getFeatureSource(typeName); if (featureSource instanceof SimpleFeatureStore) { ...


1

One way to do it LasTools (its lisence i not OO, so you have to check it) and LAS data. Run tin creator to las data (use only type 2 point which are ground ) and you have ground tin. If you work in Finland there is free LAS data from Maanmittaulaitos. What comes to other European countries i dont know. But you can easily build process and demo from free ...


1

Shapefiles in GeoTools are not mutable - the only way to change the schema of the shapefile is to read it in and write it back out to a new file with the modified schema. To merge heterogeneous shapefiles you will need to read the schema of each file you want to import and then create a new schema that contains each attribute in those schemas. Then for each ...


1

geotools is not a rendering library. It a Java toolkit which can read spatial data and provides access to geometry,attributes in the data. It provides certain algorithm for geometry processing. JTS, Java Tolplogy Suite contained in GeoTools. This was ported to C/C++ as GEOS. You can try GeoServer which uses geotools for processing and uses OpenLayers for ...


1

Have you tried to define the Mercator projection using a WKT string? http://spatialreference.org/ref/epsg/3395/prettywkt/ and a org.gdal.osr.SpatialReference object calling the method SetWellKnownGeogCS: String wkt = "PROJCS["WGS 84 / World Mercator",GEOGCS["WGS ..."; CoordinateReferenceSystem worldMercatorCoordSystem = CRS.parseWKT(wkt);


1

A shapefile stores attributes in dBase III format. That format stores everything as ASCII text strings. Although these are perfectly capable of containing some kind of code for null values, no convention ever developed for this. Accordingly, most software for reading and writing dBase files interprets non-numeric ASCII text within numeric fields either as an ...



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