Hot answers tagged

7

Not automatization (strictly speaking), but one good helper tool would be Gimp Selection Feature plugin. It enables us to access Fuzzy selection tool of Gimp 2.10, and returns a polygon layer taken from the area you have chosen. When I tested it on your posted image, Threshold value set at 60.0 was good at differentiating the blue river and surrounding ...


5

GeoDataframe now accepts a geometry keyword argument. Taking advantage of that, we can write envgdf = gpd.GeoDataFrame(geometry=gpd.GeoSeries(env)) This automatically sets the GeoSeries as the geometry column.


5

As per the comment, you need to choose the format you want to convert to by choosing the Save to file option in the 'Converted section, and then picking the format you want to convert to. You need to end up with a GDAL command that begins with ogr2ogr -f "LIBKML" You have to do this because the default option for this tool as per the documentation is ...


5

The GeoJSON specification requires the coordinate order to be longitude, latitude. You should file a bug against your client. A position is an array of numbers. There MUST be two or more elements. The first two elements are longitude and latitude, or easting and northing, precisely in that order and using decimal numbers. Altitude or ...


5

Wow this is very fun and... extremely hard for me. Assuming "arrival" as your Arrival time field: Hour........... lpad(to_string(floor("arrival")),2,0) Minutes...... lpad(to_string((floor("arrival"*60)%60)),2,0) Seconds..... lpad(to_string(round(("arrival"*3600)%60)),2,0) Wrapping the above into single expression, it ...


4

You just need 7zip. The archives that Esri uses are basically zip files but winzip and windows default zipping does not work. Use 7zip to unzip a layer package LPK,OR Mobile map package or VTPK or TPKX


4

How to split a vector layer and convert it to KML format The split vector layer tool creates geopackage files by default. If this is a process you do frequently, it may be worthwhile to follow the steps here to change the output setting for this tool. Otherwise, it takes two steps to split your layer and convert it to KML. Split the layer using the split ...


4

UPDATE: After thinking about it, the most efficient method for you to transform the coordinates is probably to not use apply but to use the column array. from pyproj import Proj pp = Proj(proj='utm',zone=10,ellps='WGS84', preserve_units=False) xx, yy = pp(My_data["LON"].values, My_data["LAT"].values) My_data["X"] = xx My_data["Y"] = yy Using Transformer ...


4

If your CSV contains columns with values that are all valid numeric representations then it will be read in and interpreted as a numeric field and so available in graduated styles. If the column contains text that cannot be read as a number, then it will be interpreted as character values, and so not available for graduated styles. For example this CSV: ...


3

You can create separate polygons in KML format directly when using the Convert format tool without using other tools as follows and using an example: This is a grid shapefile with 20 polygons Use Convert format tool from Processing toolbox -> GDAL -> Vector Conversion -> Convert format Select Input Polygon shapefile (20 polygons above in this ...


3

This transformation can also be computed with proj software (either using command-line or programmatically) by employing what proj calls an oblique translation (ob_tran) applied to a latlon transformation. The projection parameters to be set are: o_lat_p = north pole latitude => 35° in the example lon_0 = south pole longitude => -15° in the example o_lon_p =...


3

The string with coordinates is WKT (Well-known text). In FME you could use a GeometryReplacer to (re)create the geometry of the feature based on the WKT string.


3

You can try the plugin Another DXF Importer/Converter, or in QGIS 3 try the import DWG to geopackage function under Project in the menu bar. Neither option will fully preserve everything exactly as CAD and GIS systems store information quite differently, but you will get to transfer over layer names, text, and colour information. Note that you may need to ...


3

Something like this? In the Shapely manual you can find published code on how you could generate images from geometry objects (that could be constructed by WKT). linestring.py from matplotlib import pyplot from shapely.geometry import LineString from figures import SIZE COLOR = { True: '#6699cc', False: '#ffcc33' } def v_color(ob): ...


3

You can directly use shapely or GeoPandas but with 9888562 records It will take a long time to do (if you want a Progress bar during the pandas operations, you can use tqdm: ) 1) With your solution and the first 4 points import pandas as pd df = pd.DataFrame({'LAT':[47.9767,47.9803,47.9801,47.9798], 'LON':[-122.2450,-122.2458,-122.2472,-122.2465]}) ...


3

QGIS should be able to do that easily without any plugins. First, you will need to make sure you are using the correct projections. You may already be doing this, and setting projections can be cumbersome depending on where your shapefile is located in the world, what projection it is in etc. In QGIS, go to the "Vector" menu, choose "Geoprocessing Tools", ...


3

If you have a matching .wld and .prj file then the gt-image module can read and write jpeg and png files. Once you've read the file in to a GridCoverage you can reproject it and write it out with no difficulty: AbstractGridFormat format = GridFormatFinder.findFormat(input); Hints hints = null; if (format instanceof GeoTiffFormat) { hints = new Hints(...


3

There are two steps to what you're trying to do, and it's easiest to do them separately: Opening your data in QGIS Reprojecting it to WGS84 Opening your data: From the Data Source Manager, choose Delimited Text and make sure you're setting the point coordinates fields correctly, along with the CRS of your source. Reprojecting to WGS84: In the layers ...


3

When using numerical values, you need to write your expression without singlequotes like this: CASE WHEN "z" < 0 THEN 0 END Singlequotes are used for strings. Also you do not need is operator in this context. Not sure what you wanted to do with result =, but if its a field name you need to use doublequotes like "result" =. If you just want to ...


3

Assuming you want to update the "result" field using the value from the "z" field the syntax is CASE WHEN "Z" <0 THEN 0 ELSE "Z" END You get 0 for negative "z" value and keep the positive value the same (You need to select "update an existing field" and choose the "result" field) Or CASE WHEN "Z" <0 THEN 0 END to change the negative value in ...


3

You need a custom function which I have translated from my Java translation of the OS Visual Basic to python. Insert the following into a new Function in the Expression Function editor (see this class for more details of how to do this). from qgis.core import * from qgis.gui import * gridLetters = [["SV", "SQ", "SL", "SF", "SA", "NV", "NQ", "NL", "NF", "...


3

If the subject is about the QGIS Field Calculator expression; if("gon"<300, ("gon"+100)*0.9, ("gon"-300)*0.9)


2

I ported the TopoJSON code from JavaScript to Python, following the exact same format Mike uses in his library (along with his +300 tests). If you feel better with Python, just install the library by running: pip install pytopojson And then run: python geo2topo.py geojson_file You can also use a quantization parameter. Just use the -h argument to see ...


2

With the release of QGIS 3.8 there is new feature to generate raster MBTiles layers. Once the layer you want to convert is setup, you can open up the Toolbox by either selecting the gear icon or by going into the processing tab on the menu bar and selecting toolbox. Then in the Processing Toolbox, drill-down into the Raster Tools section. Within this ...


2

Welcome to SE GIS! Are you a fellow Washingtonian? I suspect that your problem is linked to the data you received. There are a couple of things to consider: Washington state is divided into two State Plane Coordinate System zones: North and South (I'd display an image of that dividing line for you, but I can't find it at the moment). Anyway, that ...


2

When converting from DD⁰ MM' SS", you must remember that S latitudes will become negative and that W longitudes will become negative. Simply multiply the converted lat and/or lon by -1.


2

Here is a solution that I think will work for you: Go to Plugins and install the mmqgis-plugin Use the plugins' combine function to merge your layers. Save/export the combined layer as KML.


2

I don't know what it was like back in 2016, but as of QGIS 3.10, this is implemented in in the available functions in QGIS in the expression editor or the field calculator. The documentation on the right (in the field calc dialog) gives you the solution of: to_date( "MyDateFieldNameWithDatesAsStrings" , 'dd/MM/yyyy' ) (whitespace are optional) and hit "OK"....


2

This can be used using GDAL. First, install GDAL for your OS. You can convert files from the terminal by using following command: #ogr2ogr -f GeoJSON -t_srs crs:84 [output_filename].geojson [input_filename].shp If you want to use python script then by calling subprocess, this can be achieved. Python script example is given below: #Convert Esri .shp file ...


2

Then projection is EPSG:3628. How to find such info? You try your luck at https://epsg.io/ and search for New York. You get a big list of possible EPSGs and then try. When you click one, let's say EPSG:3628 (as I did in my first try), you'll see something like: Don't get discouraged by the text about Puerto Rico, trust the title (New York Long Island), ...


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