Tag Info

New answers tagged

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/polynom 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


2

You are doing good so far. Just try to change the syntax of your polygonz declaration. I did it for you. Here is the complete working code with comments where neccessary: # import shapefile library import shapefile #create an in memory polygon shapefile w = shapefile.Writer(shapeType=shapefile.POLYGONZ) #add a name field to it w.field('NAME') #fill ...


2

Use an iterator in your model, specifically the Iterate Feature Selection iterator, then use Copy Features to output each feature to it's own feature class. Your model will look something like this: The element called Value temporarily stores the name of the current feature in the iterator. I've also added a variable for a Folder called OutputFolder ...


3

Split Layers by Attributes check out this python toolbox. Split Layer by Attributes, county being the attribute you want


4

If you need full database support with simultaneous user access handling, POSTGIS would be the best choice. As a first step on remote postgis access, see Connnect to PostGIS db using QGIS - when not on localhost See also: Best choice for building static maps: PostGIS, SpatiaLite or Shapefile?


1

Google Maps Engine works with WGS84 EPSG-Code 4326, so you'll need to project the shapefile into the correct projection. ArcGIS: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00170000007m000000 QGIS: http://docs.qgis.org/2.2/de/docs/training_manual/vector_analysis/reproject_transform.html?highlight=transformation


1

Right click your table in the "Table of Contents" click "Display XY Data." Choose whichever fields map to X, Y, and Z, then choose your coordinate system. Right click the event layer, and export to your desired location.


1

It seems that you've followed all the steps except one, that is ticking the"Add layer to canvas" box. Check in the directory where you stored your new layer, it might be there. Alternatively, try to add the layer you've just created and see what happens. I hope this was of some help. Cheers


0

You can convert shapfiles to geojson using shapefile-js library or other similar libraries, in the browser without making any server calls. then use that geojson data with Turf.js


1

Revisiting an old topic, but some might benefit from this link http://www.eia.gov/maps/layer_info-m.cfm Not particularly high resolution, but it does show many of the major pipelines.


0

What are you importing into? ogr2ogr would be my choice for converting shapefiles into various other formats, including GeoJSON: ogr2ogr -f "GeoJSON" output.json input.shp Turf is 100% javascript by the way, so there is no turf format apart from GeoJSON (also referred to as a FeatureCollection in the docs and modules): Turf uses GeoJSON for all ...


0

In ArcGIS 10.2 for Desktop this is a two step process: Use Excel To Table (Conversion) to convert your Excel file to a table (dBase or file geodatabase) Use Join Field (Data Management) to join the contents of your table to your shapefile based on a common attribute field.


0

well, if the excel and the shapes have a field in common you can join the excel to your shp. If not you can make a common field between them and do the join.


2

You can save the csv layer as shapefile to edit the data. Therefore right click the added csv layer in the layer menue and select Save as.... Following dialog will open: Now you can save your csv as shapefile. The resulting shapefile is editable.


1

I have found a solution to my issue and I would like to share it. I managed to export attributes (up to two) in the "save as" window when saving a vector layer. More precisely, in the "data source options" section, I have: Set as "relativeToGround" the "Altitude Mode" Wrote name of attribute I would like to export in the "DescriptionField" field Wrote ...


1

The kml xml schema does not have a tag for labeling polygon features only placemarks = points. A workaround for doing this is to create a new point layer from polygon layer and in the Save vector layer as dialog define the labeling field in the NameField text box. Once you have both kml creted in GE, select File>Open to add both kml in. Alternatively, you ...


0

I figured it out. I needed to load in a xls version of my dataset, with the zipcodes as a text field. This required importing the data into excel, not just opening it. I then imported the xls file into ArcGis, and joined it with an ArcGis shapefile of the US zipcode boundaries. I used "select attributes" to select all the zipcodes in one zone, then went to ...


1

Compute population noise exposure by using interpolated data introduce error in the results. You have to compute noise level by giving receiver points. According to NS-EN ISO 140-5 they should be placed at 2 meters in front of the building facade. As you have used NoiseM@p and OrbisGIS to create the layer contouring_noisemap you can stick with it in order ...


1

Access the Field Calculator of the new polygon layer as shown in the image (or right-click the layer to access the attribute table and then access the field calculator from there) and create a new field called "Area". Set the Field type (I prefer Decimal as you can give a precision) and use the following command in the Expression: $area Repeat the same ...


2

You may use the Select Layer by Location tool to select polyline feature at set distacne away from your site layer. Selects features in a layer based on a spatial relationship to features in another layer. Each feature in the Input Feature Layer is evaluated against the features in the Selecting Features layer or feature class; if the specified ...


1

Try this: import os, arcpy, shutil from arcpy import env if os.path.exists(r'E://tmp//ProcData'): shutil.rmtree(r'E://tmp//ProcData') if not os.path.exists(r'E://tmp//ProcData'): os.makedirs(r'E://tmp//ProcData') importFiles = r'E://tmp//RawData' outputFolder = r'E://tmp//ProcData' spatialRef = arcpy.SpatialReference(26917) env.workspace = ...


1

I ended up rasterizing the polygon to the extent of the original raster, and simply reclassified the rasterized polygon so that areas overlapping with the original raster were coded as 1 and the remaining cells were coded as 0.


1

You need to use the Dissolve tool on your ZIP shapes, with the zone designation as the field to dissolve on. This assumes all your ZIP shapes are in a single shapefile/feature class. If the ZIPs for each zone are in their own file/feature class, you can Dissolve without any attribute to create a single shape out of the entire zone (or start an edit session, ...


0

You should use Merge Tool to merge all your shapefiles to a single shapefile. Then use the unique values Renderer (color ramp) of ArcMap to render the map as you expected. To do so: Add your newly created shapefile (from merge tool) to the map right click the layer and then click properties follow the following image


3

The native plot window of R does not have zoom capability, but here are some options: resize your plot window only plot a section of the map by specifying xlim and ylim arguments to plot() write the map to a very large pdf, e.g. precede the plot command by pdf("file.pdf", width=20, height=20) and send this to a plotter write to the plot to pdf, load in a ...


-2

forget qgis and all those osm-software! they all only thieving your strategic time-ressources and never do, what they should ... you give your REAL data to OSm - and gets back: NOTHING THAN TROUBLE! an infernal spy-project - nothing more!


0

I haven't heard about that problem yet but there can be basically just two things wrong. Either the projection of the shapefile is not correct or you messed up the "save as" function with any inputs apart from what is set default. i tried it with a random shp file with same version and for me it works. So check your settings.


4

Assuming that there is a unique key in common to both shapefiles I think you should be able to use the Join Field tool to join the fields you want from shapefile2 onto shapefile1. Then you can do whatever calculations/comparisons that you wish.


2

Ok, so I figured out the issue... I scanned through other shapefiles I have that are related and noticed that their SRID is set to 2278. I inputted that for the current shapefile and I'm getting the correct coordinates now. Someone probably messed it up in ArcGIS or similar beforehand. Thanks for taking a look!


2

If you have a Java background then python should be easy.. here's something that I put together: import sys, os, arcpy InRaster = sys.argv[1] InShape = sys.argv[2] SplitField = sys.argv[3] OutFolder = sys.argv[4] # simple switches based on the output, change as needed # note that python is case sensitive (true != True) so in # the case of booleans ...


2

Here's one approach to designing your database tables: Wherever you have shapes that have exactly the same combination of geometry type and set of attributes, put them in one single table. Probably, this will be based on those themes you mention. If that still appears to be too many tables, maybe think about combining those themes that are very similar (re. ...


1

Three options off the top of my head: Checkout openstreetmap.org and use OSM data, or Post this question at http://opendata.stackexchange.com/, or Digitize the footprints from Google Maps (or Bing Maps).


1

Use directly the GDAL module rather than using it through (Geo)Django: from osgeo import osr ori = osr.SpatialReference() desti = osr.SpatialReference() ori.ImportFromProj4("+init=EPSG:2227") desti.ImportFromProj4("+init=EPSG:4326") transformation = osr.CoordinateTransformation(ori,desti) transformation1.TransformPoint(5979385.3163340045, ...


0

I decided to try some alternative tools to see if I had a problem in my workflow. At the suggestion of one of the commenters above, I instead did the following: I used ogr2ogr to reproject the input shapefile into EPSG:3857. I then used shp2svg to convert the Spherical Mercator shapefile to an SVG. This resulted in an SVG file that rendered properly in ...


0

Follow this workflow: Open QGIS, load your Shapefile layer, and select it (i.e., make it active) in the ToC. Open the QGIS Python console. Copy the following code snippet and paste it in the QGIS Python console: lyr = iface.activeLayer() lstDelete = [] for idx in lyr.dataProvider().attributeIndexes(): uv = lyr.dataProvider().uniqueValues( idx ) ...


0

This is in a projected coordinate system, most likely, for San Francisco, SRID 2227 which is in feet. Lat/lon is known as SRID 4326, in this same system. You can convert from one to the other in Python using gdal. Here are instructions for doing this with django, I am sure there are other ways. >>> from django.contrib.gis.geos import Point ...


1

I would start with reading what a script tool is: What is a script tool? Then check how to supply parameters to a script and how they work. Then read how validation works in script tools - you might want to do some checks on the input shapefile before proceeding any further: Understanding validation in script tools After that you are ready to perform the ...


1

That solved my problem. Further information and a tutorial can be found here http://gdal.org/1.11/ogr/ogr_apitut.html A C++ version for GDAL 1.11: #include <GDAL/ogrsf_frmts.h> int main() { OGRRegisterAll(); OGRDataSource *poDS; poDS = OGRSFDriverRegistrar::Open( "data.shp", FALSE); }


1

If you look at this and this, they say that both GDALOpenEx() and GDAL_OF_VECTORS were (will be?) introduced in GDAL 2.0. GDAL 2.0 seems to be still under development. In case that you are able to compile it, you can find the source code here. In older versions you would use OGROpen to read a Shapefile.


0

I finally found a solution by clicking the Generate simple geometries instead of MULTI geometries in the options dialog of pgAdmin III import plugin:


3

Here is a simple example to create a SpatialLinesDataFrame, which can be saved as a shapefile with rgdal::writeOGR(): # create example data set set.seed(1) dat <- matrix(stats::rnorm(2000), ncol = 2) ch <- chull(dat) coords <- dat[ch, ] plot(dat, pch=19) lines(coords, col="red") library("sp") library("rgdal") sp_line <- ...


3

@Joseph is correct with the join, but you may want to convert the polygons to lines first, as you have said each facade is effected differently, as this will show which facade is experiencing the greatest impact. With each facade as a line, then you can do the join. Make sure you have a unique building ID which is propagated to the line segments. With the ...


4

If I understood you correctly, you can use a function that joins polygons by location. I did this in QGIS using Join by location but there should be an equivalent function in ArcGIS. I made a simple example with 2 polygons: "House" and "Noise". The House polygon touches all 3 noise levels from the Noise layer: I then used the Join by location function ...



Top 50 recent answers are included