Tag Info

New answers tagged

0

Looking at the shapefiles here all they contain is a field DN with numeric values. There is no X or Y coordinate. In order to plot anything spatially there needs to be a reference. In python I am not sure if you can do this. The shapefiles provided are polygons and lines which are meant to overlay a basemap or surface of America. However, if you are using ...


2

I see that you were able to use a plugin to get the values you wanted, but here's why the values were changing in the first place. This isn't specific to QGIS or any other software, it's an issue with how the data is being stored. Floating point values are stored with a specific precision (number of digits). Some software will automatically round the stored ...


0

As far as I know, QGIS doesn't support the .fdshape file extension. But maybe you can go along with the converter you can find here? It allows you to export/convert .fdshape files to .shp files. There's also a manual for that tool.


0

I finally managed to resolve my problem. My solution was to load data into temporary spatial table on PostGIS server, delete all records from table and then insert all records from temporary table to database. DELETE FROM public.target_table; INSERT INTO public.target_table SELECT * FROM public.source_temporary_table; All you need is a table with ...


2

Open a new dataframe, don't add a basemap, just the shapefile, move your mouse around on the screen and look at the coordinates towards the middle are they small numbers that look like latitude and longitude? Open windows explorer and navigate to your shapefile... look for a *.prj file, if you don't have one, then you are working with data that no ...


2

Once you get the shapefile/projection problem solved: Kriging is a method of interpolating points to create a continuous surface. I think that you actually want to use graduated colors to modify the symbology of the points, manually setting classification breaks at the values you need.


1

Firstly, you should do Feature To Point in order to create your centroids. Then, you obviously need to create your buffer. For the third step is to use Tabulate Intersection to know how much of each polygon is under your buffer. Finally, you summarize your table to get your synthetic value and you join the resulting table to your original polygons (or to ...


1

You seem to be using a dynamic workspace, which I don't think is right here. Assuming you want FME to create the new table, the following steps should be what you need to do: 1) Open the Generate Workspace dialog (Ctrl+G) 2) Enter Shape as the source format 3) Use the browse button and select ALL of the shape files to be converted 4) Set the output ...


1

For the HEIGHT it would be with respect to ground. For the ELEVATION, most countries have a national geodetic survey that should be used as a reference. Those NGS are usually defining their own MSL. What you usually extract from an existing dataset is the elevation. The height can then be computed as the difference between elevation at the top and the ...


0

Gdal_rasterize uses the center of the pixel. As a workaround I would either rasterize a buffer around your input polygon (with half pixel size) or apply mathematical morphology on the result (aka erosion of one pixel)


0

Would you be able to try loading your layers directly into QGIS from PostGIS? See http://docs.qgis.org/2.2/en/docs/user_manual/working_with_vector/supported_data.html#postgis-layers


1

Normal convention in my locale is with respect to ground since elevation above MSL would be meaningless to the average user.


1

If you use geoserver's Shapefile Output on the WFS service, it doesn't matter what the source of the data was. It doesn't matter whether the data is coming from Shapefiles or PostGIS or something else. Let me try to provide answers to all your sub-questions. It doesn't matter about how big the table was, or how many features it contained, Geoserver can ...


0

You can approach it in different ways, better working with same type of layers: both raster or vector files. I would do in a quick&dirty way: Use "Polygon to Raster" to convert sinkhole shapefile into a raster: Value field "FID", Cell assignement "Maximum Area", Cellsize same of risk raster, on Environments/Extent snapped with risk raster. Reclassify ...


0

The asker figured it out. There are two very similar pages, one written for 9.x and then modified for 10.x and re-posted. He'd found both through Google and had them open alongside a lot of other tabs in his web browser. For the record they are: http://docs.geotools.org/stable/userguide/tutorial/feature/csv2shp.html ...


-1

Check out http://thunderheadxpler.blogspot.com/2014/01/hadoop-and-shapefiles.html - in theory my ShapefileInputFormat could be used when defining a Hive table - tho never try it !


0

@ghostfacemapper the records do not need to be in the same order. Not true at all. Now, if you are getting an error that says: ERROR 000339: Input [YOUR FILE NAME] does not have OIDs Failed to execute (Join Field). You can fix the problem by 'adding' an objectID field by using arcGIS to make a new table that has an objectID. You can do this by ...


2

You should really be doing this in edit mode using the editor toolbar. Rather than creating graphics or converting graphics to shapes, create the shapes directly in the file. See the help topics and its subtopics


0

Using this tool Split Layer by Attributes worked wonders for me.


2

The controls on the map appear to be OpenLayers. Here's how you can find out yourself what kind of data it's using in the client in Chrome or Firefox: In Chrome, go to Menu > Tools > Developer Tools and switch to the Network tab. In Firefox, go to Menu > Developer > Network Refresh the page, pan around the map a few times, see what resources load.


2

You should be able to export the shape file as a GeoJSON file from QGIS. With the shapefile added to your map, right click on it in the legend/TOC and click on 'Save As...' in the pop-up menu. Select GeoJSON as the output format Keep in mind that while it is valid JSON, the GeoJSON output this way may not be in the exact format you are expecting. OGR ...


2

As you can see from the comment thread above, layer files and relative paths are a bit complicated. The problem is that a layer file (*.lyr) can either hold absolute paths or relative paths, but there doesn't seem to be any (easy) way to ascertain which it uses, after the layer file has been created. To create a layer file with relative paths, there are ...


1

Australia post used to give out a CSV (or was it pipe delimited) file with suburb to postcode lookup, even then some suburbs had multiple post codes and some suburbs weren't represented - the GPO postcodes, post boxes and commercial postcodes (yes, you can buy your own post code so it covers only your business). Now you actually have to purchase the data ...


0

The OpenJUMP error message resends the error from PostgreSQL database. The message tells that AddGeometryColumn function does not exist and that indicates that the GIS database is missing PostGIS. PostGIS extension is not installed automatically to new databases but it must be explicitly installed by using SQL CREATE EXTENSION postgis;


3

This set of extracts from OSM data may be what you're looking for. In particular, this shapefile of the coastline around Helsinki.


2

Many of these (3 of the 4) can be found in open street map. Here is some good information on obtaining the data http://wiki.openstreetmap.org/wiki/Downloading_data and here is some info on converting it to shapefile. http://wiki.openstreetmap.org/wiki/Shapefiles


0

Usually you could use the inbuilt Python datetime library strptime method to read in the date/time string you have, but unfortunately it has issues when reading time zones from strings. Instead you can use the python-dateutil library to parse the date string, and the datetime.strftime library to write it out. For example: from datetime import datetime from ...


2

For geoprocessing, I suggest to turn on-the-fly-reprojection in QGIS OFF to see whether your shapes align or not. In many cases, geoprocessing does nor work when the shapes are in different CRS. So save your polygon layer as WGS84 EPSG:4326 (do NOT use Set CRS for Layer for that!), to match with the points layer coordinates. For the NaturalEarth dataset, it ...


0

If you do not have a GIS Package yet, QGis is an excellent and free Application that will let you load up all your files and overlay them on top of each other so you can see exactly what is in them. KML and Shapfiles could contain the exact same data, however KML is much more suited to displaying time based track information, whereas shapefiles are more ...


1

One way of approaching this is with the following technologies: Server with PostGres/PostGis, GeoSever and a Web Server installed. (Could be a windows desktop machine using IIS) This will allow you to import the shape files and KML files into a database with geometries and create layers to present to the end user You will need to build tables of vehicles ...


1

The WLmap2_polyline data is using WGS 1984 UTM zone 24N, but the data is actually in zone 20N. Denmark uses a wide-area implementation of transverse Mercator for Greenland. I checked against ArcGIS and our "complex math" version of TM doesn't improve the offset. Or the data was projected into UTM 24N using the a more standard UTM implementation and that's ...


1

There are a number of ways you can accomplish that. You can use ogr2ogr clipsrc if you have your ellipse as a shapefile: ogr2ogr -clipsrc ellipse.shp output.shp input.shp And since you tagged this question with pyshp, you can also use that. The code below demonstrates the concept you mentioned using an ellipse and randomly-generated points. If you are ...


0

It would be easier to answer if you could provide an example (image) of what you want to do. Basically, overlapping polygons that you do not want to overlap is a topological problem. For this kind of problem, you can use the v.clean command in GRASS. This command can fix several error. In your case, bpol ( break (topologically clean) polygons (imported from ...


1

You do not need to recreate the datastore every time. It is just a pointer to a location on your disk. In the case of shapefiles, you can simply copy the new ones into the relevant folder and (assuming the files have the same names and are already referenced as layers in Geoserver), the update is done (without touching Geoserver). Given the number of ...


1

Technically yes, it is possible. However there are no packaged tools with SpatialNET to do so, so if you were to do it (which I would advise against in the strongest terms) the method would be to build the data in ArcGIS and then bulk-load it to the Oracle Spatial back-end of the SpatialNET instance. (There is also a Python API that you could use to build a ...


2

Hi The column time 4th is like "2014-05-30T16:32:39+0000" and I´d like to format it as '30 / 16:32 UTC' to show this in the label. For that you can use Regular expressions: you want to extract '30T16:32' from the string (This isn't geospatial but ...) The pattern (regular expression to be matched) is [0-9]+T[0-9]+:[0-9]+or \d+T\d+:\d+(search for the ...


2

The ogr2ogr clip operation creates polygons but for some reason also linestrings to to South and East edges of the area. Pink lines below show those 100 linestings (one is selected). Because of mixed geometrytypes the result cannot be saved into shapefile and therefore the error. I am not sure if this is an intended behaviour of ogr2ogr clipping or a bug. ...


3

The type of relationship between your two levels of polygons is not perfectly clear, but I think that you could do this in a few automated step in any cases. Case 1 : Many to one relationship. In other word, the smallest polygons are never overlapped by more than one type of the larger polygons. In this case, you can use "intersect" or "spatial join" that ...


1

There are at least two alternatives. The first one is to use the -clipsrc parameter. ogr2ogr -f "ESRI Shapefile" test.shp world_boundaries_m.shp -clipsrc "POLYGON (( 1308807.8548639829 2728968.1094570993, 823671.391414903 169260.41200850534, 3897264.203215087 209607.73328746122, 2782801.7002406875 2976763.0370215555, 1308807.8548639829 2728968.1094570993 ...


2

This has nothing to do with your Python version or your os. The Python Networkx module (nx_spatial is very old, use directly NetworkX: read_shp) do not cut the lines at each intersection and simplify the line geometries into start and end coordinates. Generates a networkx.DiGraph from shapefiles. Point geometries are translated into nodes, lines into ...


1

The most likely thing without seeing the text file and knowing what field type the shapefile contains. Is that when you add tabular data (xls, txt) to arcmap it reads the first (or first few) values in a field to determine it's type. You can only join a type to the same type. So fips is most likely being converted to text and when you try to join cntyidfips ...


3

I came across a number of tutorials dealing with this topic that I wanted to share: So You’d Like To Make a Map Using Python - Stephan Hügel How to Make a US County Thematic Map Using Free Tools - Nathan Yau A Thematic Map in Python - Daniel Lewis Creating Map Visualizations in <10 lines of Python - Rob Story You might also consider using R: ...


0

I don't understand your script. Why use PyShp (shapefile), if you use osgeo.ogr ? You could do the same thing with ogr only ( better way to duplicate a layer using ogr in python? ). If you want to import ogr and gdal from osgeo, the formulation import osgeo.ogr, osgeo.ogr from osgeo import ogr from osgeo import gdal is a redundancy (you import ogr and ...


0

A more recent shapefile can be found here: http://www.suche-postleitzahl.org/downloads Licensing same as Openstreetmap, where the data comes from.


0

the zip-code from Arnulf 1999 is too old, i was used this file but it was wrong - for 5digits - i check with this svg - map http://www.maps4office.com/interaction-svg-maps/ - and level 8 (zip-code) was right. my german is not good but i change to DE: http://www.maps4office.de/shop-detail/deutschland-citymarker/citymarker-de-postleitzahlen-fuenfstellig/ and ...


3

We've recently released reconstructed postcode boundaries in shapefile format for UK postcode areas, districts and sectors (reconstructed from unit postcode geocodes using Voronoi etc). They are free to use. Obviously the reconstruction is approximate and may not be suitable for all purposes. They are available at http://www.opendoorlogistics.com/data.


1

Because the eastern part of Russia crosses the 180° meridian, you have to cut your shapefile there. I have written a tutorial for cutting at any meridian to use the Natural Earth shapefiles here: QGIS display world country shape files centered on pacific ocean using Robinson, Miller Cylindrical or other projection The clipping polygon for your case is: ...


1

Test if target srs epsg:54003 gives correct result. You can check with some coordinates with gdaltransform first: >gdaltransform -s_srs epsg:4326 -t_srs epsg:54003 20 40 2223901.03956182 4674067.69647085 -1662.3178422926


2

Open the attribute tables of the shapefiles and select the features with the desired Status. This can be done by using the 'select by attribute' from the attribute table window. The query might look something like this Do this for all three shapefiles. When all features desired are selected in all three shapefiles merge the selected features from the ...


2

If you have access to ArcGIS, this can be accomplished using the Explode Multipart Feature tool. Start an editing session on your feature, turn on the Advanced Editing Tools (Editor dropdown menu - More Editing Tools - Advanced Editing), select the France/French Guyana feature, and then click the Explode Multipart Feature tool from the Advanced Editing ...



Top 50 recent answers are included