Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
4

Method 1: Add a reprojector before the coordinate extractor to convert the points from the source coordinate system into LL84. The points will then be in latitude/longitude. Note that following the coordinateExtractor the X attribute will hold longitude and the Y attribute will hold latitude. This method assumes the GDB has the current map projection for ...


4

Here's one way to find a similar CRS to the one used for an existing map. Since your map has lat/long lines, you can make a GIS project with the same lines into different CRS's until you find one where the lines are curved and angled the same as in the image. Create lat/long lines: Use the grid tool to make a lat/long grid for this area (longitudes 23 E ...


3

Python would be so slow at this, I would use C++. Read your XYZ file using a normal ifstream then use strtok to break apart the single line into tokens and make the string tokens into double. You will need to find the local WGS UTM coordinate reference system and project your origin to this CRS (sorry the OGR API is offline at the moment). From here you can ...


2

You can create a new feature class and use a data access insert cursor, projecting each Geometry with projectAs. Sample code; update with correct values for spatial reference, geometry type, etc.: mergeFcs = ["fc1", "fc2"] #merge feature classes outFc = "out_feature_class" #--- import arcpy outPath, outName = os.path.split (outFc) arcpy....


2

QGIS 3 uses ellipsoid length calculations by default whereas in previous versions, this was ignored and instead planimetric distance calculations were used. If you measure the lines using the expression: length($geometry) You should get the values you were looking for (5000m and 2000m): Before you use your code, set your project ellipsoid measurement to ...


2

After months later I found a solution. You should add two lines before and end of the script which is from @Domokos Endre: import os iface.mainWindow().blockSignals(True) layer = QgsVectorLayer(path, "My Layer", "ogr") crs = layer.crs() crs.createFromId(32637) # Whatever CRS you want layer.setCrs(crs) QgsProject.instance().addMapLayer(layer) iface....


1

Additional information would be useful here. How do you know the coordinate system is unknown? Is there any info in the metadata? If there is no coordinate system projection assigned to the file, you can define one. Sometimes people forget to do this (sometimes it's just wrong). Your goal is to guess the correct projection. Make a copy of the file and use ...


1

You need to use Query.setCoordinateSystemReproject(CRS) not Query.setCoordinateSystem(CRS). One changes the output coordinates and the other tells the system what CRS the coordinates of any geometries in the query are in. This code fetches the boundary of Pennsylvania in EPSG:2272. public static void main(String[] args) throws IOException, ...


1

Try defining the output extent in the coordinate system you are reprojecting the raster to. You can reproject your extent using the following code: # Code for QQIS 3.xx - QgsCoordinateTransform is different in v 2.xx # crsSrc = QgsCoordinateReferenceSystem(rlayer.crs()) crsDest = QgsCoordinateReferenceSystem(4326) #epsg of target crs xform = ...


1

This is an old questtion but I got here trying to find a solution to a similar problem so I'll share my solutions: I have two solutions for this problem. Option 1: add SRID to the table One is adding an srid to the table that is missing one, or removing the srid from the one that has an srid. Basically make sure the SRID of the two tables match. Option ...


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