Tag Info

New answers tagged

0

Take a look at the code below. Full code in git repository can be here: https://bitbucket.org/bugramovic/fme_arcobjects_interop_example PrintStream out = System.out; FMEWorkspaceFactory fmeWorkspaceFactory = new FMEWorkspaceFactory(); IPlugInWorkspaceHelper plugInWorkspaceHelper = fmeWorkspaceFactory.openWorkspace( pathToFdlFiles ); ...


0

Take a look at this code: http://bitbucket.schuller.lu/hibernatestgeometry Hibernate uses WKB/WKT representation to update geometry data.


2

(This answer addresses the comments of John Barça’s comments… a little too large to put into the comments section). Again, I got this to work using PhoneGap, but I should perhaps clarify things a little bit. 1) I used PhoneGap Build instead of installing PhoneGap on my computer (glad to have a workmate who can give me this great kind of advice!). You will ...


1

If you wish to use HTML5, you are probably better off using PhoneGap. PhoneGap abstracts away the significant differences between the hardware and APIs on different mobile platforms, iOS, Android, Windows, etc, allowing you to use Javascript, CSS and HTML to access the sensors, such as GPS. See the supported features/sensors grid. You cannot otherwise access ...


2

Changing Java Heap Memory for Geoserver sudo vi /usr/share/tomcat7/bin/catalina.sh line 3 export CATALINA_OPTS="-Xms2048m -Xmx8g" Change the "-Xmx2048m" to desired value, as Xmx is case sensitive, you can use "g" for GB or "m" for MB After the changes are saved, remember to restart tomcat: sudo services tomcat7 restart


0

You are getting the ArrayIndexOutOfBoundsException because you are not setting the wmsURL correctly. The API expects the URL to conform to the server type, e.g. http://srv1.nanoterra.ro:8080/geoserver/wms, then use the methods on WMSLayer to configure the layer. Below I offer code that loads the layer: // set up the sml url wmsURL = ...


0

Another alternative is to use GDAL ogr2ogr utility. If all your csv are in one directory this terminal statement (using OSGeo4W Shell) should work: ogr2ogr -f "PostgreSQL" PG:"host=myserver.abc.com port=54321 user=postgres dbname=mydbname password=mypassword" C://Temp


0

In Linux/Mac or on Windows using cygwin you can simply call the psql command in a loop, using Postgres's built in COPY command. You use the -c switch to psql to indicate that you are running the command inside the quotes. This works well because you can use the operating system to get the list of files very easily. For example, for x in $(ls ...


0

Is this a Polygon x Point intersection? If so, your code seems correct. Your picture clearly shows a set of polygons (buildings, in yellowish) and another set of polygons (in red). It's not clear from your question, where the problem is. Is the polygon intersection failing? If that is the case (buffered points, which are in turn, polygons), your code is ...


1

Have a look at this documentation of CRS http://docs.geotools.org/latest/userguide/library/referencing/crs.html#well-known-text It is possible to set the CRS from WKT. The documentation says: CoordinateReferenceSystem can also be defined by a text format ((called “Well Known Text” or WKT). This is a standard provided by the OGC and shows up in ...


2

I used the ogr java bindings: public static void unitOfCRS(){ SpatialReference poSourceSRS = new SpatialReference(); // output: metre poSourceSRS.ImportFromEPSG(3068); System.out.println(poSourceSRS.GetAttrValue("UNIT")); // output: degree poSourceSRS.ImportFromEPSG(4326); ...


1

You could perhaps look into the PROJ4 library. There seems to be a Java binding, which you could use. I am almost confident that I have done a similar task before, although with Python, but I cannot find my code to double check. Either way, there should be a way to get a string which includes all the parameters of a specific coordinate system. You would ...


3

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


1

Openlayers should fit your need, but I don't know what kind of "gis files" you want to deal with. Consuming and displaying 256x256px tiles is easy, but storing a whole country offline will slow down any application.


1

Perhaps you could start with JTS and use first RandomPointsInPolygon and create then VoronoiDiagram from this point set. Create lots of polygons and union the smallest one with its neighbor and loop until you are happy. But because the points in the first step are random it is always possible that some of the Voronoi polygons are bigger than the 1 sq km ...


1

I found the answer. I had to create a FieldDefn See code: public static void gdalPolygonize(String[] args){ gdal.AllRegister(); ogr.RegisterAll(); args = gdal.GeneralCmdLineProcessor(args); Dataset hDataset = gdal.Open(args[0], gdalconstConstants.GA_ReadOnly); Band rasterBand = hDataset.GetRasterBand(1); Driver driver = ...


0

Well it is a bit late but maybe there is someone else with this problem. There is the command gdalinfo . If you have pictures with only 1 band and a color palette you can use it to see which DN-code stands for wich RGB-Value. Here is an example of the code using the gdal java-bindings (gdal 1.11.1): public static void main(String[] args) { ...


1

@mashhour-darweish ,Try the below approach.The code is in C# style. It may be similar in Java too. Geoprocessor GP = new Geoprocessor(); GP.OverwriteOutput = true; Intersect IntersectDataset = new Intersect(); IntersectDataset.in_features = "(" + srcShapefilePath+"\\polygon.shp", "polygon.shp" + "; " + srcShapefilePath+"\\lines.shp" + ")"; ...


0

Another option is the service provided by AddTransit (http://addtransit.com), of which I am the manager of. AddTransit has web based software that assists in creating the GTFS Feeds or the AddTransit team can do it for you. The web based software also supports Real Time feeds and vehicle positioning as well.



Top 50 recent answers are included