New answers tagged

0

You can add a virtual ogr layer creating an .ovf file like the following and adding it to QGIS. <OGRVRTDataSource> <OGRVRTLayer name="LAYERNAME"> <SrcDataSource>MySQL:DBNAME,user=DBUSER,password=DBPASS,host=DBHOST,tables=TABLENAME</SrcDataSource> <SrcSQL>SELECT * FROM TABLENAME</SrcSQL> ...


0

I had the same question, and after scouring all documentation and other information I could find on this, I think the answer is that specifying X and Y fields as geometry source is only supported with the Delimited Text Layer driver - although I haven't found any reference which states this explicitly. In other words, if you want to use a database such as ...


2

If you have the data in Excel you'd probably do better doing the calculation in Excel! The Haversine formula (find it here: http://www.movable-type.co.uk/scripts/latlong.html) will give you the distance between two pairs of latitude and longitude.


1

The coordinates you have are in WGS 84, just note Zagreb's coordinates: 45.8167° N, 15.9833° E. Have in mind that's in degrees and it is a geographic coordinate system. If you do not know exactly the difference between a geographic coordinate system and a projected coordinate system let me know and I can link you to a good website explaining it. Just ...


-1

I solved this problem with Java + Ibatis implementing the interface TypeHandlerCallback. You need to add postgis.jar lib; Create a handle class implement TypeHandlerCallback from Ibatis;


6

This screenshot confirms that you have the x and y coordinates the wrong way round, as I mentioned in my comment earlier. The coordinates are in degrees, just assume a CRS of 4326 to start with. Don't worry about projections for now. Once your points are showing over Croatia, then you can re-project into a suitable local projection. x=45, y=14 will show up ...


2

You can use the Geometry service project method to do this projection. Since it is an asynchronous call, it will not be as responsive as the example (which is being calculated in the browser). The core code to change is in showCoordinates: Working example: https://jsfiddle.net/gavinr/f8e62ajc Edit: John Gravois has a blog post explaining this exact problem ...


1

Pretty much all android phones will record the GPS coordinates of a picture in the EXIF data, so you should already have that feature. http://www.digital-photo-secrets.com/tip/1401/how-do-you-find-the-gps-coordinates-of-your-photos/ http://www.phonearena.com/news/How-to-enable-or-disable-photo-and-video-geo-location-on-Android_id62637 ...


0

If you use the buffer tool it will create a circle of a specified distance around each point.


0

Works fine now. Here is the code for anyone interested. Useful if you need to copy OSGB1936 co-ordinates into Google Maps. Seems the way I was inserting the text into the clipboard was crashing ArcMap. Also should be tool not button. Protected Overrides Sub OnMouseDown(ByVal arg As ESRI.ArcGIS.Desktop.AddIns.Tool.MouseEventArgs) MyBase.OnMouseDown(arg) ...


0

You could also create a new column via Field Calculator with the following expression: '["lat"=>'||$y||', "lng"=>'||$x||'],' Then, export your layer in CSV format (as indicated by @ed.hankins). Open the CSV file with a text editor such as Notepad++ in which: replace carriage returns by nothing in order to put all your coordinates on the same line ...


0

Make the layer you want to export the active layer, and paste following code into python console (or execute as script): fn = 'E:\\test.txt' f = open(fn, 'w') for feat in layer.selectedFeatures(): f.write('[') for p in feat.geometry().asPolygon()[0]: f.write('[\"lat\"=>{0:.5f}, \"lng\"=>{1:.5f}], '.format(p[0], p[1])) f.seek(-2, 2) ...


0

right click on the layer you want to export and select save as and choose CSV (comma seperated value) then in the layers part of the OGR options type GEOMETRY=AS_XY I am not sure how to export it to the exact format you want, but you can use excel to batch them into that format after the export. also see: How do I calculate the latitude and longitude ...


0

Finally got an answer on github: Internally, Leaflet transforms EPSG:4326 coordinates to pixel coordinates. These pixel coordinates are the EPSG:3857 coordinates divided by a power of 2 (and then rounded). It might be possible to fetch some of these coordinates (look at methods like L.Map.latLngToLayerPoint) and then multiply stuff given the zoom ...


0

Using the explode_to_points=True argument into updateCursor as suggested in this link did the work. Thanks to @klewis for the comment. However, because the updateCursor in my case works with two fields, I had to specify two arguments in the final updateRow call, as row[0] refers to the filed Floor_Number, while row[1] is the Z coordinate I need to change. ...


1

Use the 'Add Delimited Text File' (It has the icon of an apostrophe). You then specify the lat/long coordinates in the x/y fields and those points will be rendered. You then right click the layer and save as a shapefile.



Top 50 recent answers are included