Tag Info

New answers tagged

1

I would suggest to export the shapefile(s) to SQlite or FileGDB (which should perform better in QGIS). You can either do this in QGIS GUI (right click on layer a select Save As), or use OSGeo4WShell to covert using ogr2ogr, e.g. command: ogr2ogr -f "FileGDB" C:/Temp/myshp.shp C:/Temp/test.gdb OR ogr2ogr -f "SQLite" C:/Temp/myshp.shp C:/Temp/test.sqlite ...


5

Load the data into SpatiaLite in QGIS... best way is to create a new SpatiaLite database via the right-click GUI in the browser window, then simply drag and drop your shapefile onto the SpatiaLite database you just created. From there you have all the power of SpatiaLite at your disposal. Some more documentation can be found here, and there's the SpatiaLite ...


0

Perhaps use GRASS to Clip the area? You could run this in command prompt, and it wouldn't require loading the dataset with qGIS first.


0

You have been caught out by a (recent) update to the shapefile read/writer code. The geometry field of a shapefile must be called the_geom (if you check http://docs.geotools.org/latest/userguide/tutorial/feature/csv2shp.html you'll see it is there). This is an attempt to fit in with how other programs interpret the ShapeFile specification (I believe).


0

The two GIS web mapping terms you are describing are indeed clustering and then spatial indexing. Clustering is usually done client side while indexing is done server side, usually using a geodatabase, with a server-side map rendering engine in the middle. In KML, there is a relatively new feature called "Regions" which tries to handle the display side of ...


0

my.attribute <- read.csv.... IMPORT TABLE WITH ATTRIBUTE TO ADD #load some key spatial libraries for R library(maptools) library(sp) library(rgdal) library(raster) #load your shapefile ?readOGR my.shapefile <- readOGR(dsn="C:/leads/to/your/shapfiles", layer="yourlayername") plot(my.shapefile) # does it look ok? ?merge joined <- ...


2

You first need to understand the different ways to create geometries and the geometrical relations in GeoDjango (GeoDjango: GEOS API), without a database: 1) create valid geometries: # with Point, Polygon objects of GeoDjango from django.contrib.gis.geos import Point, Polygon, poly = Polygon(((0.0, 0.0), (0.0, 50.0), (50.0, 50.0), (50.0, 0.0), (0.0, ...


2

If you want a single polygon (which you have indicated), you want to use Dissolve. This is under Data Management Tools in the toolbox. It is also in the Geoprocessing menu. http://resources.arcgis.com/en/help/main/10.2/index.html#//00170000005n000000


1

You want to use Merge in an edit session. This will modify the original shapefile. Click the Edit Tool on the Editor toolbar. Click the features you want to merge. The features must be from the same layer. Click the Editor menu and click Merge. Click the feature that the features will be merged into and will supply the attributes for the ...


3

I'm not entirely clear on what you did, but I suspect you've misunderstood how map documents work and the distinction between data and symbology. Layers are just symbolization. You can have the same shapefile data represented ten different ways on ten different layers in a map. Layers are an mxd thing, not a data thing. If you start editing, now you're ...


1

The easiest solution is to use union, cascaded_unionor unary_union. All the lines are split at the points of intersection: from shapely.geometry import LineString line1 = LineString([(0, 0), (2, 2),(3,1)]) line2 = LineString([(2, 0), (2, 1),(1,2)]) print line1.intersection(line2) POINT (1.5 1.5) for line in line1.union(line2): print line LINESTRING (0 ...


0

One thing that tripped me up when reading SOSI files using GDAL: You need to make sure you have write access to the directories containing the SOSI files. The library creates a temp file in the same directory as the file you are reading from. This is explained in a NOTE on the page http://trac.osgeo.org/gdal/wiki/SOSI Also, make sure the environment ...


3

You can use ogr2ogr with the -sql option to use a sql statement


0

One suggestion is to double check the projections of the layers you are working with to make sure they are the same. I see you wrote "All three of them have the same adjustment," not sure if that means projection or not. I have had very strange things happen using files that line up in the data frame using projection on-the-fly, but are not actually set to ...


0

When you create child_poverty_by_state, you need to create the geometry table with the following, assuming you are working in WGS84 .. ALTER TABLE child_poverty_by_state ADD COLUMN the_geom geometry(POINT,4326); You also need to ensure that the geometry column has the correct srid, it is not always added from the shape-file, for example for WGS84 ... ...


2

One option that may be a bit faster (less clicks) or you could call from a script would be to use ogr2ogr command (using OSGeo4wShell (which comes with installation of QGIS)). ogr2ogr -f "ESRI Shapefile" C:/Temp/Shps C:/Temp/test.gdb If you want to export out a subset you may use the same command above but at the end list out the table name(s) (e.g. ...


5

File Geodatabase in QGIS 2.4 Note: Use Directory rather than File Once the file geodatbase is loaded save the shapefile


1

If you are willing to program python: arcpy has the "fromWKT" function, which can read a WKT string and return a geometry object. See http://resources.arcgis.com/en/help/main/10.1/index.html#//018v0000008s000000 . FME has a WKT reader also: http://docs.safe.com/fme/html/FME_ReadersWriters/Default.htm#wkt/wkt.htm


2

The point feature is a bit more straight forward once you have your table in excel (with your X and Y columns), save it out as a .csv and you may use the Make XY Event Layer tool to convert to event layer and then use Feature Class to Feature Class tool to convert to shapefile. The polyline and polygon are not as straight forward, you will have to build a ...


0

I would start with TileMill, some excellent open source software. This will allow you to design maps, pulling data from shape files, postgis, etc, and render then via Mapnik to various different formats. TillMill is used by the OSM project for rendering their tiles. TillMill has a form of CSS for designing maps, called CartoCSS, and this is used to ...


0

Try the following workflow: Add a new field in your polygon layer "Value". Make sure the value is > any of the land use values. Use Polygon to Raster (Conversion). Make sure to specify the value field you created in step 1. Also make sure to specify the same cell size as your land use raster. Use Cell Statistics (Spatial Analyst) with a "MAXIMUM" ...


0

You can convert to raster using the conversion toolset in arctoolbox. If you have the Spatial Analyst extension you can use the Plus key to add the two data sets together. When performing either operation make sure that you set the analysis extent and cell size to that of your input raster through the Environments tab


2

JJD yes there is. I haven't used it myself. You use the -m option and pass a mapping file that has the old column name and new column name on each line. As Ryan alluded to here: http://www.bostongis.com/pgsql2shp_shp2pgsql_quickguide.bqg I suspect he was thinking of -m and mistyped -f. Hope that helps, Regina


0

found the problem: the files were still busy from the check if it contains geometries. ds=None lyr=None Setting both variables = None before actually deleting the file solves the problem.


0

Both the Field and Alias can only be changed in the Properties\Field Properties within a .gdb using ArcCatalog. Later versions eg 10.2.1 and above have a Data Management / Alter Field tool (although still only for .gdb). I export the changed file back to a shapefile for further use. A solution will be to change the MapInfo header file to align with the ...


0

You can use MapServer Export plugin from from Quantum GIS. Just load all your shapefiles to QGIS, set style and other properties, and use Mapserver Export Plugin.


3

Convert from shape to gmt use this example code : ogr2ogr -f "GMT" Hudson_bounds.gmt Hudson_bounds.shp


1

Yes, the extent isn't accurate. If you have spatial analyst extension then use IsNull to create a binary raster, raster to polygon (no simplify) and then dissolve with no fields to create a clipping polygon. Once you've got that then just clip as normal. If you haven't got Spatial Analyst then it's a bit more tricky.


1

I'm guessing based on your final image that while the green does provide 100% coverage, it is broken up into separate polygons - otherwise (if it were a single giant polygon) you'd be getting nothing selected. The problem is your Relationship choice. Within means that only whole polygons (not areas or parts of polygons) from layer A that lie within a ...


0

It appeared that the multipart-to-singlepart tool wanted to bust apart all the multipart features in my layer, and create a new shapefile. This seemed overkill. Instead I just copy/pasted the desired feature. Then I moved the copy, so as not to overlap, deleted the extra parts from both the original and the copy, and moved the copy back to its proper ...


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 ...


3

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.


2

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.



Top 50 recent answers are included