Tag Info

New answers tagged

0

The file utility is able to guess the encoding of a text file. Use ogr2ogr for a conversion that (hopefully) preserves the original encoding: ogr2ogr -f CSV file.csv file.dbf file file.csv Example output: file.csv: ISO-8859 text I have tested it with two of the most frequent encodings, UTF-8 and latin1. Works out of the box in Ubuntu, not sure about OS ...


3

You have to reproject one layer to another name and the CRS of the other before you can merge them. Merging only works if both files look well-placed with On-the-fly-reprojectionturned OFF.


0

The Neighborhoods are plain old Polygons. The Water is Polygons with ZM Values. This is likely your fix. Remove the Z and M values and I suspect Stata will read it.


0

If you're working with spatialite, here's how to do what you want: The SQL format is INSERT INTO ... SELECT FROM ... So, suppose you have a permanent spatial table "trees" with columns attrib1, attrib2, attrib3. Now one of the field guys brings a new shapefile "new_trees" with equivalent fields col_x, col_y, col_z. You would import the new shapefile into ...


0

Did you search for the algoritm? It's present in my QGIS 2.8.1


0

Providing a Environment Variable to the GDAL data directory solved it. import os os.environ["GDAL_DATA"] = 'C:\Python27\Lib\site-packages\osgeo\data\gdal' import fiona from fiona.crs import from_epsg schema = {'geometry': 'Point', 'properties': {'X':'float'}} shp = fiona.open('F:/temp/asdf.shp', 'w', driver='ESRI Shapefile',crs=from_epsg(4326), ...


1

I am sure all your classes are represented in your feature class. They will be further down in the attribute table. You have more than 200.000 features. As Michael said, when you convert a raster into a Polygon, pixels of the same class, which are not directly connected will be represented in a different class. Try to dissolve you new feature class (data ...


3

This method uses the intersect() function from the raster package. The example data I've used aren't ideal (for one thing they're in unprojected coordinates), but I think it gets the idea across. library(sp) library(raster) library(rgdal) library(rgeos) library(maptools) # Example data from raster package p1 <- shapefile(system.file("external/lux.shp", ...


1

Based on the screenshot, you are most likely using ArcGIS. In that case, I strongly recommend you to not use any shapefiles as the source of your routing network, but use ESRI's free "ArcGIS Editor for OpenStreetMap", which is a very useful ModelBuilder toolbox with tools for OpenStreetMap data. It has build-in tools for downloading the required data, and ...


1

I think you are looking for the Intersection tool available in QGIS. In the following picture each feature of the blue polygon has a soil attribute and while the red polygon is the polygon of your clip. Using the Intersection tool in QGIS (Vector -> Geoprocessing -> Intersection) or in Processing (open the Processing toolbox and type Intersection) the ...


2

A group aesthetic is missing: ggplot() + geom_polygon(data=fortify(regions), aes(long, lat, group=group)) Otherwise the last point of a polygon is connected with the first point of the next polygon. See also here: SpatialPolygonDataFrame plotting using ggplot Remove connecting lines in ggplot2 geom_polygon


0

After a quick browse of your code it seems like the object shplySnapPoint from shplyLineString.interpolate is of type shapely.geometry.point.Point. The write.addFeature takes a QgsFeature / QgsPoint as argument. Try parsing the shapely geometry to a QgsPoint and use that object in the addFeature method. Pseudocode (have not used shapely before): ...


0

If you type a help (Python Console) of QgsVectorFileWriter.addFeature: help(QgsVectorFileWriter.addFeature) Help on built-in function addFeature: addFeature(...) QgsVectorFileWriter.addFeature(QgsFeature, QgsFeatureRendererV2 renderer=None, QGis.UnitType outputUnit=QGis.Meters) -> bool you get something equivalent to 'your error'. So, the object ...


1

Here my tuppence worth: The UK does not have any cadastral maps because our land laws are different to most countries and revolve around the concept of rights-through-time as opposed to simple ownership. This explains why the Ordnance Survey data do not show legal boundaries. However, that said, The history of boundaries in UK and modern planning ...


1

You might look at creating a point feature class with the field structure that you require in ArcGIS, and then checking-out the schema of that fc (or the data, if you plan to carry out field edits to exisiting points) to both the Junos, using the Arcpad Data Manager toolbar. Do the data capture, and then check the data back in to ArcGIS. This will populate ...


2

You try to edit the schema of already published shapefile layer and add new attributes into the schema. That is not supported from the admin utility and I cannot recommend any reasonable workaround either. As written in http://docs.geoserver.org/stable/en/user/services/wfs/schemamapping.html, The GeoServer WFS supports a limited amount of schema output ...


0

As long as the units are set up the same and produce identical files (same attributes, field names, coordinate systems, etc.) then yes, there are several simple ways to combine the data from the two units. The Merge tool can combine them to a new file. The Append tool can add one file's points to the other. You could also use a copy/paste operation in an ...


0

If you are happy with Java then GeoTools provides SQLServer and Shapefile datastores that will allow you to do the conversion. But to be honest I'd use ogr2ogr, which is something like: ogr2ogr "MSSQL:server=.\MSSQLSERVER2008;database=geodb;tables=rivers;trusted_connection=yes" dst.shp


0

I understood you want to build the shape from zero, so it means that you do not have nothing just the need: "A shape who represents a traffic lights which contains the information about time sequence". In that case is simple, just make a field survey and obtain all the points of the traffic lights. After that you need to assign to all points the information ...


2

I'm not sure how you can obtain a shapefiles initial CRS but you can reproject your shapefile to another New Zealand grid system (EPSG:27200 - NZGD49 / New Zealand Map Grid) via the Save As... option. I used QGIS 2.6.1 to successfully reproject the shapefile:


0

Check the properties of your shape: In 'Symbology' tab under 'Show' you will find the option 'Multiple Attributes', I think is good a way to do it. Establish the 'Value fields' you want to be consider it, after that, under 'Variation by' you must to establish the 'Color Ramp'. Another window will be open and in that one you can select the fields you need to ...


0

a workaround would be to convert feature to lines, and then back from line to polygon. The you create the centroid inside each new feature in order to recover the attribute (and maybe delete the slivers,which will not contain points.


0

The Juno does run on windows, but if you have not heard of the trimble 3000, you should look into it. the 3000 has .5 meter accuracy when in static mode, and the juno has 2.5 meter accuracy at best in static mode. Now if you do get the r8/r10 Base/Rover system either one will have sub-centimeter accuracy. the down side is the 3000 is about 40% larger.


0

The first option here is where you specify the beginning and ending range for the FID numbers... import arcpy arcpy.env.workspace = "c:/Wing/Sk" # Set overwrite option arcpy.env.overwriteOutput = True # Make a Feature Layer for the original shapefile arcpy.MakeFeatureLayer_management("spatially50.shp", "lyr_MyOriginalLayer") # Then create a layer for ...


0

This will take the first shape in the dataframe and make Layers (temporary) and save them as shapefiles with different names like you wanted. Use the code in the Python window. import arcpy, os mxd = arcpy.mapping.MapDocument("CURRENT") df = arcpy.mapping.ListDataFrames(mxd, "")[0] lyr = arcpy.mapping.ListLayers(mxd, "", df)[0] desc = arcpy.Describe(lyr) ...


1

R.K.'s answer is heading in the right direction. Unfortunately, the pgShapeLoader.app file is needed (within /Applications/OpenGeo/), otherwise the script with plugins.ini will now execute properly (it has no file to reference). I'm not sure the file is available anywhere other than OpenGeoSuite. Ironically, if you download the OpenGeoSuite and install ...


2

Solution 1: Depending on your GIS Software, somewhere in your Project you find a list of your loaded layers. Usually visibility goes top>down .. so just drag your point-layer on top of your shape. Solution 2: Change the "Fill" color to transparent and just display the border of the forest polygon(s).


2

As Mapperz said, the data you have and the map example are using different projections. You may want to research the topic, as it is fundamental to GIS. If you want to change the appearance, you need to Reproject the data (aka change the coordinate system or CRS). I believe the data you have comes in GCSNAD83. Your map example looks like it might be using an ...


1

Your shapefile is probably the whole USA without state boundaries. Google USA states shapefile or go https://www.census.gov/geo/maps-data/data/tiger-cart-boundary.html and download the USA states shapefiles in the data section. To get exactly the color of the other map you need to right click the shapefile in qgis and head to properties- symbology and play ...


0

It's not clear what set of tools you're using. This approach in R might be of value though. Essentially I convert the raster cells that meet some criteria to polygons, then use overlay to subset out those lines that pass through the desired raster cells. require(sp) require(raster) require(rgeos) require(RColorBrewer) # Just for the plotting ...


1

In QGIS 2.8.1 there's a tool in the Vector menu that can split a dataset based on an attribute. Look in Vector > Data Management Tools > Split Vector Layer... It's a basic tool that should work if you don't want to resort to plugins or tools in Processing; unless they offer additional functionality you need.


1

Have you looked at gogeo Platform (www.gogeo.io) or CartoDb (http://cartodb.com)? I guess that Google Maps can't handle with millions of polygons. goGeo was made to work with Geospatial Big Data and CartoDb was built upon Postgis.


1

In general it's better to use the return type you've declared rather than rely on exceptions, so something like this may work better: public boolean openShapeFile() { try { File dataFile = new File(fileName); dataStore = new ShapefileDataStore(dataFile.toURL()); SimpleFeatureSource source = dataStore.getFeatureSource(); ...


3

I have addressed the topic in a previous question that was partially-related to this one. That being said, here are the places that I know of off the top of my head that have publicly-available parcel data in shapefile form. Through the Southern California Association of Governments (SCAG), you can obtain parcel shapefile data for Imperial, Los Angeles, ...


2

I am not sure the parcels of the entire state are readily available for free. You may have to look for it on a county by county basis, which may be laborious for 58 counties. This page has a link to the GIS site for each county: http://www.coordinatedlegal.com/gis.html The State of California Geoportal website has downloadable parcels for selected ...


2

Using PGAdminIII create a database using the template_postgis as a template, this copies all the triggers, functions and tables into a new database. Right click on the databases symbol and select 'new database': Then you can import data into it. It is probably best to not use the pg_admin user but if you're the only one seeing the database that should be ...


0

Im not sure if you have to a FDOtoolbox solution or if that is just your preference, because another good option for this sort of work is ogr2ogr. Once it is installed you can just run something like this from the command line. ogr2ogr -overwrite -f "PostgreSQL" PG:"host=myhost user=myuser dbname=mydb password=mypass" my_file.shp I hope that helps, Rowan


0

Try shapelib .You will find Java for basic Shapefile operations.For advanced operations you may want to try JTS .http://www.openjump.org/ is another Java based tool.All these are Desktop solutions.Plenty of options are listed out here


6

Use definition query to hide the null data. Have a look at this help topic. So you will need to put something like: [Field Name] IS NOT 'NULL' This will effectively remove the null data from your map project without altering the dataset itself.


3

That sounds a bit odd. I think you should be able to set any value to null-color (double click symbol -> "no color"). Could you add a screenshot? As a workaround you could make a separate file out of them: Select by attributes (e.g."VALUE" IS NOT Null) Export data Display


-3

As others have mentioned (including the horse's mouth), apparently ESRI excluded code to translate the Attributes, so to use ArcMap the user has to go through extra steps to split the data then rejoin it in ArcMap. Other GIS display/edit tools can be used to avoid these arduous extra steps.


1

The merge tool does keep the metadata, but oddly enough only the metadata for the first input in the list of merge inputs. As mattytunks21 said, copying the XML file that is associated with the other layer files will save the metadata and then you can just copy and paste the xml contents from one into the other to have all your metadata.


0

To preserve the data you could export the xml files before you do the geoprocessing.


0

I prefer to use Feature Class to Feature Class, as you can use it to go back b/n both formats.


0

If I got your question right, in ArcMap, within Catalog window browse the gdb and then right click to Export to SHPs.


0

If you want to use the WKT format, the correct syntax is: "POLYGON Z ((398000.0 7542000.0 279.9, 398000.0 7541990.0 281.0, 398010.0 7541990.0 280.4, 398010.0 7542000.0 279.4, 398000.0 7542000.0 279.9))" and not POLYGONZ( but it is very easy to transform your original format to correct WKT poly = 'POLYGONZ((398000.0 7542000.0 279.9, 398000.0 ...


3

First, you can still use the PointsToPaths-Plugin (https://plugins.qgis.org/plugins/pointstopaths_v02/). Maybe you must enable the option "Show also experimental plugins" under Plugins > Manage and Install Plugins (Plugin Manager) > Settings. Second, ensure that your data field with the order has a numeric-type (e.g. integer, ...) I tried to create lines ...


1

The MMQGIS plugin has a menu entry Create -> Hub Lines. This should do what you want. It needs two layers (start and destination), so you might have to add your point layer twice to the canvas.


1

A basic approach would be: -) create a vector-writer for a new shapefile (see Cookbook, Section "Writing Vector Layers", 2nd example) as (multi)line/polygon or whatever you need (see enums) -) load your point layer from iface.legendInterface().layers() -) iterate through your points and add the geometry feature in your new shape €: just for fun: from ...



Top 50 recent answers are included