Hot answers tagged

4

It seems that geopandas is the tool for the job in this scenario. I attempted using transform_geom from Fiona as suggested here but the results were the same as what you show above. But, since geopandas uses a different method to transform the geometries, it seems to do the trick: import geopandas gdf = geopandas.read_file("input.geojson") gdf_wgs84 = ...


3

you have to use data defined overrides for that, see picture below if you want to take the opacity field in count, we have to change the data defined override and use an expression to put the separate opacity and color fields together. QGIS is expecting the opacity information within the color value as an alpha value between 0 and 100. The expression then ...


2

The arcpy.Geometry type supports a projectAs(spatial_reference, {transformation_name}) request, so it should be simple to project a singleton point (PointGeometry) from GeoJSON to the spatial reference of your target layer. Of course, projecting the point is only the first step in your process, since selection and rendering is done at a layer level, not ...


2

You can find an unknown projection using projfinder.com if you have a coordinate in lat-long and a nearby coordinate in the other system. From your data, I took one of the points in the geoJSON: 7634671.5713, 1248001.2551000006 and zoomed into this coordinate from the geoJSON attribute data: "Longitude": -73.520563459, "Latitude": 45.522783335, ...


1

If you would be able to use external tools, namely gdal, this could be done with gdal_rasterize -burn 255 -burn 255 -burn 0 -ot Byte -of bmp -ts 1000 1000 my.geojson output.bmp This would display everything in yellow on a black background. ...and then converting the bmp to png with your favorite tool, I would use imagemagick.


1

L.GeoJSON.AJAX object is an extension of Leaflet L.GeoJSON object and so it inherits all it's options (this is not explicitly mentioned in leaflet-ajax plugin docs). This means it's possible to use onEachFeature option to specify function where popup is binded to layer. In your case this would look something like: function onEachFeature(feature, layer) { ...


1

Instead of using the L.GeoJSON.AJAX method of loading in my data, I have opted to use $.getJSON as shown here. I was able to then load the popup at a later line using L.geoJSON and add my 'onEachFeature' using .addTo(map). This can be seen in the following code: <script> //Create initial map with predefined location. ...


1

shapely is a library that is very useful to do spatial analysis in python. It has a function to compute the nearest points between two shapes: shapely.ops.nearest_points() Here is a code snippet showing how you would go about using it in your case: import json from shapely.geometry import Point, mapping, shape from shapely.ops import nearest_points with ...


1

I think you are confused, check again the ArcGIS API for JavaScript Sandbox example. The url property is where you should put the source of the data, in your code js/all_month.geojson. One more thing, GeoJSONLayer has no data property.


1

Use arcpy.Project_management() to convert from one coordinate system to another (including to/from a projected from/to a geographic CRS). See the documentation at: Project You could convert either your shapefile, or your GeoJSON to an in_memory feature class with the same CRS as the other, and then work with that in_memory feature class instead of the ...


1

The problem is you need to provide an instance of the Polygon class as as a geometry to the Feature class. In your hardcoded example, you are giving actual coordinates as a geometry. In the for loop, you are converting the coordinates to a str type and giving the polygon in a Well Known Text (WKT) format to the Feature class. So normally your problem will ...


1

What you are trying to achieve will never work. Browsers do not allow javascript to freely access files stored on the user's local file system. This is a fundamental security feature. Otherwise, there'd be nothing to prevent any website from sniffing your computer and doing whatever it wants with all your files. In addition, I believe you misunderstand the ...


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