Tag Info

New answers tagged

1

Ok, just found the problem : I forgot the parameter "name" in my Vector constructor... My bad


1

The definition for MGI_Austria_Lambert is straight from Esri software. It has several differences in naming conventions plus quirks in the projection/parameter names. Some of these date to older versions of the EPSG Geodetic Parameter Registry where Esri has not updated to match EPSG. Esri has one keyword for Lambert conformal conic and it's possible to ...


2

CLU isn't available to the general public. It's considered PII now. None the less. It's doesn't cover all ground, just those involved in USDA programs. Plus, the boundaries don't always match up with what's actually going on the ground. For example, a producer decides to crop one part of a field in beans and the other in corn. The CLU boundary may not ...


1

When I worked at NRCS, we used CLU layers, which followed tracts of fields. I don't see them at http://datagateway.nrcs.usda.gov/. However, if this is a serious request for data and you are willing to put some time into it, you should give your local county field office (either NRCS or FSA) a phone call. They are usually happy to help, and if you ask to talk ...


1

I think you are approaching the problem the wrong way. You can't load a gigantic dataset and expect fast interactivity. If you've already simplified as much as you want, and it's not fast enough. Try a different technology. If you're not happy with TileJSON, use CartoDB or MapBox to to it for you, or use WMS for viewing and WFS for interactivity. Or load ...


0

I came back to this a year later and was able to solve it easily. I stored the current markers ID property in an array. Whenever the GeoJSON is requested the L.GeoJSON filter is used to check if the ID property of each incoming marker is in the array, returning true or false depending. When new GeoJSON is added, the markers in a GeoJSON group layer are ...


1

Converting GeoJson to numpy array seems to be much easier than trying to convert WKT to numpy array. import numpy as np import json #if your geojson is a string geoJson = json.load(geoJsonString) numpy_array = np.array(geoJson['coordinates']) and back to geojson: geoJson['coordinates'] = numpy_array.tolist() #if you are looking for string geojson ...


2

To change point markers, you should use the pointToLayer function. See the example page. var geojsonMarkerOptions = { radius: 8, fillColor: "#ff7800", color: "#000", weight: 1, opacity: 1, fillOpacity: 0.8 }; L.geoJson(someGeojsonFeature, { pointToLayer: function (feature, latlng) { return L.circleMarker(latlng, ...


1

I suppose you have been reading this http://docs.geoserver.org/latest/en/user/tutorials/cql/cql_tutorial.html Here comes some sample requests which are sending queries for the demo server of Boundless but which should work similarly with your own server if you have demo layer topp:states installed. Select where STATE_NAME is Illinois ...


1

Interrupting a rendering process is not possible in Leaflet since it is performed in a single atomic JS job (AFAIK). The only way to make your app more responsive to user interactions might be to boost the rendering process so that it completes faster. Simplifying the geometries (or using topojson) is an excellent first solution for that. Another one could ...


0

All the code you would need is available in GeoTools but it will probably not work in a mobile environment. However looking at the code might give you a start provided you can live with a LGPL license.


1

There are java bindings for GDAL/ogr - see http://gdal.org/java/ . No idea if they work on Android, though. Apparently ( https://www.google.de/search?q=gdal+on+android ) building gdal on Android is not really easy. http://sourceforge.net/projects/javashapefilere/ seems to be another option. Also ...


1

I don't think the issue is with the ST_GeomFromGeoJSON call. It's possibly the id field you have OR your table structure. Can you provide your table structure. SELECT ST_GeomFromGeoJSON('{"type":"Point","coordinates":[-48.23456,20.12345]}'); alone works fine, so doubt that is your issue. If the above query fails, then your postgis install is corrupt in ...


0

In QGIS 2.4 (not sure about previous versions), when you right-click on the layer and choose "Save As...". On the "Save vector layer as..." dialog, be sure to change the CRS dropdown from "Layer CRS" to "Selected CRS" and then browse to "WGS 84 / Pseudo Mercator (EPSG: 3857)". Everything else should work the same and give you the output you expect.


1

I'd suggest you divide the problem into two parts: Generate a set of squares that represent the bounding boxes of each polygon ensuring they don't intersect. one way to do this would be generate a set of random points (1 per polygon) Put the first point into your master boundary. For each subsequent point, subdivide the box mid way along the closest axis ...


1

Here's solution in C#: private const double MinLatitude = -85.05112878; private const double MaxLatitude = 85.05112878; private const double MinLongitude = -180; private const double MaxLongitude = 180; public static Tuple<int, int> LatLongToTileXY(double latitude, double longitude, int z) { int tileX; int ...


1

http://leafletjs.com/examples/geojson.html Filter The filter option can be used to control the visibility of GeoJSON features. To accomplish this we pass a function as the filter option. This function gets called for each feature in your GeoJSON layer, and gets passed the feature and the layer. You can then utilise the values in the feature's properties to ...


1

There is a bugfix relating to windows that was added to version 0.10.1 of TileMill. The bugfix may solve Linux problems too. This may be related to how node.js was installed on your computer. If you didn't know, node.js is used to run TileMill. You may have to correct the node.js installation issues to resolve the error.


5

First of all I suggest to use postgis function ST_SimplifyPreserveTopology instead of qgis semplification. If I understand it right you want to have a small file with an high level of detail... and thats impossibile (if you still want to use shape files). But you can do what other webgis do. You can create 2 or more shape files with different semplification ...


1

Here's an example for C# for an envelope (i.e. polygon bounding box). This will grab extra tiles for irregular polygons, avoiding that will be complex. The Envelope class is this method is a MapDotNet object but it should be pretty obvious what the fields mean. /// <summary> /// Gets the quad tree node indicies. /// Returns the min x,y ...


0

In case you work with d3 (as your tag suggests) here is an alternative using topojson. For a tsv file "attributes.tsv" in the following format: id attribute 112 A 114 B 123 C 211 D 442 E 343 F ... Convert to topojson: topojson -o topojson.json haiti_communes.geo.json -p Join: topojson -o final.json -e attributes.tsv --id-property=+id_com,+id -p -- ...


3

I would download and install QGIS, and then open the geojson file by clicking Add vector layer button: After that you should be able to see you geojson file in QGIS: And right click the layer's name in the left hand layer list, and click "Properties"; then go to the "Joins" tab, and click the green plus icon on the left bottom corner to open "Add ...


4

If you use custom objects and properties in your GeoJSON, they are ignored when the object is read using GeoJSON format. You can clearly see this on line 115 of the GeoJSON.js source code. Since the properties are never read in the first place, it is not possible to get them in OpenLayers. There are multiple workarounds to get what you want. You could ...


2

The coordinates in your example (300247, 5040897) are in some type of projected coordinate system. Coordinates in NAD27, or NAD83 (as stated in the comments there is no such thing as NAD31) are Longitude/Latitudes which are the same form as your WGS84 sample. There is no way to determine what coordinate system has been used for your data, although you ...


1

Benno, you can use Spatial Manager Desktop, the Professional edition can read and write the formats you said(among others), and also supports the execution of tasks from the command line. You can download a trial version (limited), here: http://www.spatialmanager.com/downloads/ Hope this helps Disclaimer: I work for Opencartis (Spatial Manager ...


1

My lib PyGeoj is specifically meant as a geojson file reader and writer, with a simple API that turns the file contents into objects with attributes, so you don't have to deal with the dictionaries directly. It also has some convenience methods, like calculate and add the bbox for the entire feature collection or just for each feature. So for instance, the ...


0

YOURS navigation sites can deliver routes as geojson. Read http://wiki.openstreetmap.org/wiki/YOURS or try online http://www.yournavigation.org/api/1.0/gosmore.php?format=geojson&flat=52.215676&flon=5.963946&tlat=52.2573&tlon=6.1799&v=motorcar&fast=1&layer=mapnik However, more often routes are available as GPX or KML format. ...


1

That's a feature in pgadmin/PostGIS - it won't show geometry column values if they are too long. It's mentioned in the PostGIS manual http://postgis.net/docs/manual-dev/PostGIS_FAQ.html#pgadmin_shows_no_data_in_geom


1

Figured it out thanks to some documentation reading. The polygon in leaflet responds to setStyle but the marker can be changed using setIcon Documentation for setIcon


1

Seems like you can't do that because a marker uses an image to render. I think you'd need to grab the icon class of your marker and change the "iconUrl" attribute to whatever new image you want. Source: Leaflet API Reference Hope that helps, DR



Top 50 recent answers are included