New answers tagged lat-lon
Thanks for the pointers all. I now understand that even though my source geotif has no EPSG I can get its projection from wkt and view it as proj.4: ds = gdal.Open("mygeotiff") in_srs = osr.SpatialReference() in_srs.ImportFromWkt(ds.GetProjection()) print(in_srs.ExportToProj4()) : '+proj=lcc +lat_1=25 +lat_2=25 +lat_0=25 +lon_0=265 +x_0=0 +y_0=0 ...
According to https://osgeo-org.atlassian.net/browse/GEOS-6216, older versions of GeoServer had a bug where with an app-schema complex feature the axis ordering is always long/lat, even with WFS 2.0.0 requests or specifying the srs as urn:ogc:def:crs:EPSG::4326. We unfortunately utilise older versions :-(.
I think you need both coordinates to calculate the distance. For one coordinate further need to know the angle\azimuth.
Approximate solution. Cover area by regularly spaced points. Go through every combination of thrm by 2 ( itertools can be handy) computing total of distances to nearest of 2. Pick pair with min total.
You should have a look at the K-means clustering algorithm, which produces what you are looking for.
The coordinates are in the spatial reference system described in the file. So -2764486.928, 3232110.510 is referenced to something (that gdal doesn't have a name for). The something is: PROJCS["unnamed", GEOGCS["Coordinate System imported from GRIB file", DATUM["unknown", SPHEROID["Sphere",6371229,0]], PRIMEM["Greenwich",0], ...
Check out the below code using pyproj. You only need to know the source and destination epsg codes. import pyproj def transform(epsg_in, epsg_out, x_in, y_in): # define source and destination coordinate systems based on the ESPG code srcProj = pyproj.Proj(init='epsg:%i' % int(epsg_in), preserve_units=True) dstProj = pyproj.Proj(init='epsg:%i' ...
I would suggest using the proj4 library. You can create a php/js page that will allow the input of N,E points in csv format and it will output it the lat/long coordinates. I have written a program that can be found at http://www.gislab.net/mapping/ , this takes any Texas State Plane coordinate point (in Northing Easting) and converts to WGS84 Lat/Lon, it ...
The constant 180 would still be used for latitude because the relationship is 1 degree to a half circle. The Max and Min semicircles for latitude will be different (.5 to -.5) vs. Max and Min semicircles for longitude (1.0 to -1.0).
Top 50 recent answers are included