Tag Info

New answers tagged


Intersecting and clipping operations need at least 2 layers... I think you only have one layer and wish to save a subset in a new layer, am I right? If so, the process is: Select subset features Save selected features in a new layer To achieve (1), two possible ways: Select graphically the desired features manually on the map with one of the selection ...


Just use the Vector>Geoprocessing menu and interset that way: this is what you should see on QGIS, outputting a shape file to location. If that's not the format you require, you cna always convert back.


So the solution I found to this was to add a check for another value on the layer. In this case, the value of 'sub'. This allowed me to perform a check as to whether the layer source had a defined extent. If the extent was found, I looked up the minZoom value, got the centre coordinate of the extent, then set the view to this. The functionality seemed to ...


You can check this question it will help you solve the GetExtent problem, and check this question will help you in both layer extent and coordinates projection conversion problems.


What you need is affine transformation and it should be easy to do with Python: You'll need GDAL GeoTransform (and it seems like you have all you need for it): gt[0] /* top left x */ gt[1] /* w-e pixel resolution */ gt[2] /* 0 */ gt[3] /* top left y */ gt[4] /* 0 */ gt[5] /* n-s pixel resolution (negative value) */ And then having your x,y: geo_x = ...


The Save As ... option only works good with vector layers. For rasters, use Raster -> Projections -> Warp. The mercator projections are not able to display the North and South poles (they are in infinity). So if your shapefile includes +/- 90° N/S, the mercator raster files might go bananas.


Avoid doing compress in geodatabase, that is not really want you want to accomplish. If you are targeting SDE file all you have to do is invoke sdelayer -o alter -E calc or sdelayer -o alter -E minx,miny,maxx,maxy from python using the subprocess module. you can recalculate the extent of your table by using SQL CTE like this with cte_envelope as ( ...


Use the overlaps method of https://geophp.net/ to check if the polygon overlaps the rectangle defined by your map bounds. See also https://en.wikipedia.org/wiki/DE-9IM to learn the difference between "overlapping" and "intersecting".

Top 50 recent answers are included