Tag Info

New answers tagged

0

Data Provider vs Vector Layer A vector layer has a data provider which (normally [1]) is used to store data persistently. If you edit something on the layer with a normal edit session, your changes will be saved in the vector layer until you commit them, then they will be sent to the data provider. Edit Sessions In your example you start an edit session ...


2

If you're working with local data, then you can select any number of features. You may need a lot of RAM if you're working with millions of features. If you're working with remote data on ArcGIS Server, then that number is set by the map publisher. That can be changed when publishing a MXD and changing the setting under the Parameters tab:


1

Here is one solution, perhaps there is other but this one works first create the layer : qDebug() << "Create Memory Layer Tracks"; QgsVectorLayer * lVectorLayer = new QgsVectorLayer("Point","TRACKS","memory"); lVectorLayer->isValid(); qDebug() << "Vector valid :" << lVectorLayer->isValid(); QgsVectorDataProvider * lDataProvider = ...


1

Here is the solution gsGeometry * MyPoint; MyPoint = QgsGeometry::fromPoint(QgsPoint(PosX,PosY)); QgsGeometryMap MyGeometryMap; QgsFeatureId MyFeatureId; MyGeometryMap.insert(MyFeatureId,*MyPoint); or this way gsGeometry MyPoint; MyPoint.fromPoint(QgsPoint(PosX,PosY)); QgsGeometryMap MyGeometryMap; QgsFeatureId MyFeatureId; ...


2

Obviously you can do rectangular bounding box selection with default selection tool with mouse/touchpad down + hold and move + up (there is also selection tool by polygon, freehand and elipse) You can also use Select features using expression and make selection by comparing feature Geometry xmin, xmax, ymin, ymax to your extent - minimum, maximum ...


0

My appologies for adding commenting here, reputations less than 50....tony gil, I'm new here, can you break that down or make it more simpler. And everyone, I know how to display mouse position coordinates, my only problem is that where it is currently displaying (lower right corner) I want do display map/laters attribute. So is it possible to display either ...


1

This answer by Pedro Baracho was given on StackOverflow: http://stackoverflow.com/a/31995204/1300775 (sorry for cross-posting) is it possible to simply update the source URL (and automagically refresh the layer features) ? You can create a new source and set it on the target layer using ol.layer.Layer.setSource. s=new ol.source.Vector(/* your ...


0

It's not CTRL +, it's CTRL plus ".". Eg, hold down control and press the . key. QGIS master (and the future 2.12 release) has a combobox for jumping directly to a specific atlas page. But in QGIS < 2.12 you can still jump to a specific atlas page feature. Just open the attribute table for your coverage layer, right click the desired feature and select ...


0

Firstly you must capture geometry of selected Feature. Then define simple fill symbol for captured geometry. Create Graphic with feature's geometry and simple fill symbol. Then add graphic to Graphics Layer. Then you will able to change selected items colour. Code snippets; In OnCreate method create GraphicsLayer; GraphicsLayer mGraphicsLayerParcelQuery ...


0

In the dialog box asking you which feature's attributes to keep, uncheck the "Merge into a single COGO line" box.


1

The answer to your question seems to be code like: private FeatureEntry createFeatureEntry(SimpleFeatureType schema, ReferencedEnvelope bbox) { FeatureEntry ret = new FeatureEntry(); ret.setGeometryColumn(schema.getGeometryDescriptor().getLocalName()); GeometryType type = schema.getGeometryDescriptor().getType(); Geometries ...


3

Yes, it's possible, using the new Python function editor in 2.8 or later. For a good tutorial check out this youtube video Your existing expression will always show the value of field "LAENGE" for all features, this is working as expected. What you really want is an $is_selected() function which evaluates to True if the feature is selected, or False if it ...


1

As you surmise you need to change the schema. As schema are immutable you need to copy the existing schema into a new one changing the name of the geometry attribute. You will need something like: public boolean writeFeatures( FeatureCollection<SimpleFeatureType, SimpleFeature> features) { if (shpDataStore == null) { throw new ...


0

While Feature to Point won't work with a Basic License, you can overcome this limitation with a few steps. Add a set of X_COORDINATE and Y_COORDINATE double fields and a Long field called TRACT_FID to the Tracts table. Populate the coordinate fields using the geometry calculator or with a Python Calculation of !Shape.Centroid.X! and !Shape.Centroid.Y!. ...


0

Switch definition of target and join layers (make tracts target, and neighborhoods join). The geometry of the output will be rubbish (will be tracts), but the table will be correct..i.e. each tract will have the correct neighborhood. Then dissolve the output by the neighborhood name and use SUM or some other statistic to merge the field you care about. ...


0

You could try the HAVE_THEIR_CENTER_IN match_option parameter of Spatial Join. The features in the join features will be matched if a target feature's center falls within them. The center of the feature is calculated as follows: for polygon and multipoint the geometry's centroid is used, and for line input the geometry's midpoint is used.


2

This works: OpenLayers.Handler.PolygonHolePuncherHandler = (function PolygonHolePuncherHandler_module( OpenLayers, undefined ) { //=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=// /** * Example: var drawControl = new OpenLayers.Control.DrawFeature( olVectorLayer, OpenLayers.Handler.PolygonHolePuncherHandler, { ...



Top 50 recent answers are included