texts:
I have two line feature classes representing the same roads. Their geometries are only crudely similar, while their attributes are totally different. I am trying to add the attributes of one feature class to the other based on their closest line segments. The screenshot is an example. I want to assign the attributes of the middle red line to the selected lines of the the other feature class (and ultimately do it for the whole feature class).

I've tried the "Detect Feature Changes" tool, which has worked pretty well, but still leaves a lot to be desired (ex: it might only assign the attributes to one of the selected lines below).  Ive also experimented with the Conflation toolset, but am not very experienced with it.

How can I make this process more "fine-grained" or are there other/better ways to go about it?


texts: QGIS - Understanding how to georeference NAIP CCM jp2 images with lat/lon

texts:
I'm a very new QGIS user and no GIS expert.  I am having trouble getting jp2 images to align with a vrt raster I've created from SRTM images.

What I'm trying to do:  Overlay SRTM data with corresponding jp2 images I've downloaded from USGS NAIP data.  I'm using the CCM data in .jp2 format.  Ultimately, I want to merge the images and cut them to the exact size of the SRTM vrt I've created.  I then need to rescale the pixels and output them as a series of .bmp tiles for an aviation simulator scenery.

What I'm having trouble with:  The jp2 images open in QGIS but although I specify WGS 1984, they are placed very far away from the actual lat/lon they are supposed to be at.

I know the data is in the jp2 files to do this, but there's something I'm missing about the jp2 format and how to get it to show up at the right lat/lon.  I've searched but mostly find answers about manually georeferencing an image.  I don't think that is necessary because I downloaded these images from the USGS using lat/lon coordinates as bulk files.

Using get info from the file, I get the following:

Driver: JP2OpenJPEG/JPEG-2000 driver based on OpenJPEG library
Files: /Desktop/qgis_Photoreal/Tutorial_test/NAIP_Imagery/m_4207658_se_18_1_20130820_20131029.jp2
Size is 6964, 9373
Coordinate System is:
PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",
    GEOGCS["GCS_WGS_1984",
        DATUM["D_WGS_1984",
            SPHEROID["WGS_1984",6378137.0,298.257223563]],
        PRIMEM["Greenwich",0.0],
        UNIT["Degree",0.017453292519943295]],
    PROJECTION["Mercator_Auxiliary_Sphere"],
    PARAMETER["False_Easting",0.0],
    PARAMETER["False_Northing",0.0],
    PARAMETER["Central_Meridian",0.0],
    PARAMETER["Standard_Parallel_1",0.0],
    PARAMETER["Auxiliary_Sphere_Type",0.0],
    UNIT["Meter",1.0]]
Origin = (-8550731.922834729775786,5170349.295708285644650)
Pixel Size = (1.000000000000000,-1.000000000000000)
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (-8550731.923, 5170349.296)
Lower Left  (-8550731.923, 5160976.296)
Upper Right (-8543767.923, 5170349.296)
Lower Right (-8543767.923, 5160976.296)
Center      (-8547249.923, 5165662.796)
Band 1 Block=4096x4096 Type=Byte, ColorInterp=Red
  Overviews: 3482x4686, 1741x2343, 870x1171, 435x585, 217x292, 108x146
  Overviews: arbitrary
  Mask Flags: PER_DATASET ALPHA
  Overviews of mask band: 3482x4686, 1741x2343, 870x1171, 435x585, 217x292, 108x146
Band 2 Block=4096x4096 Type=Byte, ColorInterp=Green
  Overviews: 3482x4686, 1741x2343, 870x1171, 435x585, 217x292, 108x146
  Overviews: arbitrary
  Mask Flags: PER_DATASET ALPHA
  Overviews of mask band: 3482x4686, 1741x2343, 870x1171, 435x585, 217x292, 108x146
Band 3 Block=4096x4096 Type=Byte, ColorInterp=Blue
  Overviews: 3482x4686, 1741x2343, 870x1171, 435x585, 217x292, 108x146
  Overviews: arbitrary
  Mask Flags: PER_DATASET ALPHA
  Overviews of mask band: 3482x4686, 1741x2343, 870x1171, 435x585, 217x292, 108x146
Band 4 Block=4096x4096 Type=Byte, ColorInterp=Alpha
  Overviews: 3482x4686, 1741x2343, 870x1171, 435x585, 217x292, 108x146
  Overviews: arbitrary


texts: Delineate new political boundary in dataset

texts:
In the political area I'm working on, there has been a recent formation of a new city, legitimized with government plebiscites and resolutions etc.

Geographically speaking, it's still the same land area (original town), but split into two new towns. There are no "new" extents since the New Town follows the lines of the subtowns that make it up.

To summarize:

Original Town (All Subtowns) = Town 1 (Subtowns group 1) + New Town (Subtowns group 2).

More information:
Towns.shp and Subtowns.shp are separate datasets. The particular information in Subtowns.shp are not present in Towns.shp, and both are present in our country GIS website separately, for convenience.

What I want to do:
Create the New Town boundary in Towns.shp using the boundaries of the edge-lying subtowns that make it up, but however are in Subtowns.shp.

Hope someone can help!


texts: List points from other layer where intersects with line

texts:
I want to make an easy script for QGIS calc. I have 2 layers (points, and line).
Painting the line crosing by points. At end I want to automaticly fill fild (text attribute) with list of points.
I was do it like this:
array_to_string(
aggregate(
    layer:='SLupy',
    aggregate:='array_agg',
    expression:="id",
    concatenator:=',',
    filter:=intersects( $geometry, geometry(@parent) )
    )
)

But there is mess, how to sort by as was writed first and last.
OR how to do it different way.
I was try to read first point from line like;
geom_to_wkt(start_point($geometry))

I don't know how to set list of point (or  read 'id' of first point form list of all). How can I do this?


texts: Standards for creating a RESTful Geocoding webservice

texts:
I am about to start defining a new API which will allow our clients to perform Geo Coding lookups. I would like to follow any standards there are out there. However looking at a few examples:

The Google Geocoding API
Yahoo! Maps Web Services - Geocoding API

They seem to be setup using their own standards... I was wondering if there is a recognised standard out there.. and if you could direct me to a site that uses the standard that would be great. Off the top of my head I can think of

GeoRSS
Atom with open search and geo extensions

However I'm not sure if these are recognised as the official standard.


texts:
I have collected soil analysis results on a gridded basis within fields. These grids were generated on a 35m based upon digitised polygons of the field extents.

I have imported my soil analysis results in as a csv file and these are joined to the original sample points generated in arc corresponding to their appropriate sampling point in the field.

My question relates to when I use the tool of Kriging (spatial analyst) in order to predict soil nutrient status at unsampled locations as my sampled soil data is as points the kriging output does not cover the entire field only the areas immediately around the points
I've included an image which shows this, the pink coloured irregularly shaped polygon is the field boundary and the yellow area is the kriging output.

How do I overcome this issue? Am I using an incorrect form of kriging? I had tried joining the polygon file to the soil sampling point attribute table to see did this work but it did not.


texts: Calculating satellite position in lat, lon given the position of receiver, altitude of satellite, azimuth and elevation angles

texts: I want to calculate position of a satellite, given the position of the receiver, azimuth,elevation angles and height above ellipsoid for the satellite. I think this should be a simple geometry problem but I am confused by the considerations for Earth's shape etc. I wonder if there is an easy walk through to do this?


texts: Setting leader line properties of annotation feature classes

texts: How does one go about setting leader line properties with an annotation feature class? When I reduce the size of the font of the annotation, the leader line stays the same size, so  currently I have small text with a big fat leader line. The only Pro-related answer I've found so far is to edit the behavior in the label properties, but I can't do that because I'm not making these from labels; I'm making notes on a map, highlighting specific features or areas of interest.


texts: Understanding error in changing projection of SpatialPolygon (R)

texts:
I am encountering an error I don't understand. I want to change the projection of a SpatialPolygonsDataFrame from +longlat to Mollweide or Robinson. For this I am trying to use spTransform(), but it returns the error:
"Error in .spTransform_Polygon(input[[i]], to_args = to_args, from_args = from_args,  :
failure in Polygons 125 Polygon 1 points 1:4:5"
My question: why am I getting this error?
Here is an MWE:
library(inlmisc)
library(sp)
projection <- "+proj=robin +datum=WGS84 +lat_0=0 +lon_0="

numlons <- 30
numlats <- 50

lat.df <- rep(seq(from=-90, to=90, length.out = numlats), each=numlons)
lon.df <- rep(seq(from=-180, to=180, length.out = numlons), times=numlats)

spobj <- as.vector(array(data=rnorm(n=50*30, mean=0, sd=1)))
spobj <- data.frame("dat"=spobj)
spobj <- SpatialPointsDataFrame(coords=data.frame("longs"=c(lon.df), "lats"=lat.df),
                                data=spobj,
                                proj4string=CRS("+proj=longlat"))
sp::gridded(spobj) <- TRUE
spobj <- as(spobj, "SpatialGridDataFrame")

### Change projection
spobj <- Grid2Polygons(grd=spobj, zcol="dat", cuts=100) # convert to SpatialPolygon
spobj <- spTransform(spobj, CRS(projection)) # change projection


texts:
I'm using ArcGIS for Android, version 10.1. I'm trying to add mapping technology to an existing system, and all Activities are created in-code instead of using XML files. This is something I cannot change.

I've found that when creating MapViews in this way, they will not initialise until they have been displayed on the screen. I've tried to force the view to behave as though it has been displayed on the screen, using code such as:

this.map = new MapView(context);
map.setOnStatusChangedListener(mapStatusListener);

this.baseLayer = new ArcGISTiledMapServiceLayer(basemap);
baseLayer.setOnStatusChangedListener(basemapStatusListener);
map.addLayer(baseLayer);

linearLayout = new LinearLayout(context);
linearLayout.addView(map, new LayoutParams(300, 300));
int spec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
linearLayout.measure(spec, spec);
linearLayout.layout(0, 0, linearLayout.getWidth(), linearLayout.getHeight());

I then have the mapStatusListener which will remove the MapView from linearLayout as soon as it is initialised, freeing up the MapView to be displayed in the interface.

To pre-emp the question "just add it to the interface to make it initialise", one of the ways we are using the maps is to draw it to a bitmap instead of drawing the whole map object. Using MapViews produced tearing in the interface when scrolling, and there are likely to be multiple maps on-screen in our application. I expect that redrawing an image will be far less expensive than redrawing the MapView with all its layers, etc. Therefore, I want to draw the image off-screen and recycle the map itself, only using the image. In this scenario, there is no reason for the MapView itself to ever be drawn on the screen.

I believe almost all of my current problems could be solved if I could initialise the map off-screen, but I'm stuck on how to achieve this.


texts: How to coalesce frames with mencoder in QGIS Time Manager plugin?

texts:
I need some guidance putting the exported frames together from the QGIS Time Manager plugin.

I saw your line about mencoder, so I downloaded it along with mplayer, but I'm not sure how to use them.

The .exe files do not open a program after being run.

A bit more detail on this?


texts:
I've just started using landsat-util and am having a couple of problems. First of all, the standard download command only downloads Bands 4,3,2 (the visible bands) and the QA band. In the docs it says it should be downloading a zip file of all bands. EG:

(venv)XXXXXX:landsat XXXXX$ landsat download LC81720352015321LGN00
===> Downloading: LC81720352015321LGN00_B4.TIF
   100%     65.1 MiB     374.9 KiB/s            0:00:00 ETA
     stored at /Users/XXXX/landsat/downloads/LC81720352015321LGN00
===> Downloading: LC81720352015321LGN00_B3.TIF
   100%     64.5 MiB     348.1 KiB/s            0:00:00 ETA
     stored at /Users/XXXX/landsat/downloads/LC81720352015321LGN00
===> Downloading: LC81720352015321LGN00_B2.TIF
   100%     64.3 MiB     490.8 KiB/s            0:00:00 ETA
     stored at /Users/XXXX/landsat/downloads/LC81720352015321LGN00
===> Downloading: LC81720352015321LGN00_BQA.TIF
   100%      2.7 MiB     563.9 KiB/s            0:00:00 ETA
     stored at /Users/XXXX/landsat/downloads/LC81720352015321LGN00
===> Downloading: LC81720352015321LGN00_MTL.txt
   100%      7.4 KiB       7.4 KiB/s            0:00:00 ETA
     stored at /Users/XXXX/landsat/downloads/LC81720352015321LGN00
===> Download Completed
===> Done!
Time spent : 523.64 seconds

If I try to download any other bands directly I get an error:

(venv)XXXXX:landsat XXXXXX$ landsat download LC81720352015321LGN00 -bands 8
usage: landsat [-h] [--version] {search,download,process} ...
landsat: error: unrecognized arguments: 8

I've tried this with several tiles, all with the same result. I know these files are being downloaded from AWS, but I believe that I should be getting the full zip, not individual bands?


texts: Selecting and exporting by attribute iteration in ArcPy?

texts:
I'm trying to do a loop for select and export layers by attribute and name them based on the field value. I've written the script below and it creates the shapefiles which picks up field values as shapefiles' name but they are empty output shapefiles. looks like the query in the select process isn't run.

arcpy.env.workspace = r'C:\temp'

# Create the search cursor
cursor = arcpy.SearchCursor('fc', '')

# Iterate through rows in cursor
for row in cursor:
    outfc=r'C:\temp\test'+"\\"+str("{0}".format(row.Project))
    arcpy.Select_analysis("fc",outfc,'"Project"=\'"{0}".format(row.Project)\'')

### Project is the field name which is a String.


texts: Programatically checking if field is empty in QGIS?

texts:
As part of a complex workflow which will involve several models in QGIS 3.2, I would like to check if all features in a layer resulting from a model's output do not have an empty value on a specific field before proceeding with the next model. In the event that I have a feature with an empty value on that particular field, I would like to get an error message or a warning message and stop the process.

I am fairly new to QGIS modelling and Python, and I am confused on how to proceed, as if I am not wrong there are several ways to accomplish it (python scripts, batch processes, post_hooks...). My guess is that I should create a python script and add it into my model as an algorigthm. The script should check if a all features within an input layer have a value for a field and if it is true it would output the same layer, whereas if it is not, it should display an error window, stopping the model.

Whereas it looks fine on my mind, I have do admit that I do not know how to code that script. I have read the template code for Python scripts (which is excellently commented) but unfortunately I haven't been able to create anything close to work.

Does my approach have sense? and if so, could anyone guide me with this?

Edit: I have checked QGIS API and I found this Class: QgsFieldValidator but could not understand how to use it.


texts: OpenLayers: Performance on satellite hybrid map (raster tiles, vector tiles, vector labels)

texts:
I've got a map with three kinds of layers, each of which serving a somewhat different function:

TileLayer: raster tiled map from an XYZ source (as .png) to show photographs in the background
VectorTileLayer: vector tiled map from an MVT source (as .pbf) to show polygon boundaries and enable interaction with features
VectorLayer: text labels of different size, loaded from a database, converted to JSON, and styled client-side

It's supposed to work like a labeled satellite map with photographs in the background and clickable district boundaries labeled with a text.
However, I run into several performance problems here:

Vector tiles load (or render) much slower than I expected and they delay loading of the raster tiles. When running the application locally without vector tiles, raster tiles will load extremely fast despite having a much larger file size in general (this is of course different when using a remote server). With vector tiles activated, even locally, they will show up only after the vector tiles have been loaded.
Vector labels will load fast but panning seems to be much slower when they're activated, also locally.

I wonder what's the bottleneck here: Is it just polygon counts for vector tiles and animation time for labels or could there be something more to it? Can I do anything about it without changing the data?
Here's some code to illustrate the structure:
// RASTER TILE LAYER
     var raster_tiles = new TileLayer({
        source: new XYZ({
          // ...
        }),
        // ...
        zIndex: 1
      });

// VECTOR TILE LAYER
    var vector_tiles = new VectorTileLayer({
              source: new VectorTileSource({
                format: new MVT(),
                // ...
          }),
          zIndex: 2,
          renderMode: 'hybrid'
          // ...
    });

// VECTOR LAYER FOR LABELS
    var vector_lbl = new VectorLayer({
        updateWhileAnimating: true,         // smooth animation on zoom
        updateWhileInteracting: false,      // no update needed on pan
        source: new Vector({
           format: new GeoJSON(),
           // ...
        }),
        style: styleFunction,
        zIndex: 3
    });

// MAP
var map = new Map({
    target: 'map',
    //...
    loadTilesWhileAnimating: true,
    loadTilesWhileInteracting: true,
    layers: [
        raster_tiles,
        vector_tiles,
        vector_lbl,
    ]
});


texts: Q: Where do I find my files? There are only .LOCK files

texts:
I simply need to merge 2 files, however I'm unable to figure out where they are saved.

When following the path displayed in ArcMap it only leads me to the documents folder and all I can find are the needed files ending with.LOCK. I'm unable to work with those; from what I've read this is intended?

How exactly do I find out where the unlocked data is saved?

Edit: Adding some screenshots now

This is how it looks like in ArcMap. The files I need are marked in red.

When I try to go to the data source (C:Users\s14d4e\documents...) I look at this. Those .LOCK files disappear from the folder when I close ArcMap.


texts: How do I add (and map) a non-spatial table to QGIS from SQLite?

texts:
I have an sqlite file from my Wigle Android app (wiglewifi.sqlite). It's not a spatial file, just tables with lat/lon and other data.

I can add spatialite layers just fine, but cannot seem to find a way of adding this table in the same way I'd add a delimited text layer - how to go about doing this?

Clarification: It's possible to add as a table (as per @Giovanni-Manghi's answer below), OR it's possible to export the table as a CSV and then add as a delimited text layer, but ideally I'd like a point layer based directly on the SQLite table (in the same way as in ArcGIS I would add a table then right-click and "Display XY data...")


texts: connecting ecw to its projection and grid data in an xml file

texts:
I'm new to mapping please go easy on me:)
I have a bunch of ecw files with 2 xml file one is a file ending with *.ecw.xml
and one with
*.ecw.aux.xml

I am trying to load the ecw files into mapwindow as a layer but get a message that it is an invalid data source.
I know I have to connect the projection and other data to the ecw file but just can't find out how. I have roamed the web but couldn't find any explanation. I might be searching the wrong key words due to my lack of knowledge. I also tried to load the ecw file in ecw header editor but it won't load there either.


texts: R - Create a boundingbox, convert to Polygon class and Plot

texts:
I have the  NE lat lng and SW lat lng.  My goal is simple, I am using RStudio and I want to create a bounding box from the above two lats and longs  and then generate Polygon and I want to add random points into the square polygon.
I have NELat/Lng and SW-Lat/Lng in a csv file that I could import into a data.frame.

I just need a little guidance to get started, Im very new to R language, its really different to what i am used to.

So far I have this:

coords = cbind(78.46801, 19.53407)
coordsmax = cbind(78.83157, 19.74557 )
sp = SpatialPoints(coordsmax)
sp2 = SpatialPoints(coords)

r1 = rbind(coords, coordsmax[1, ])  # join
P1 = Polygon(r1)
Ps1 = Polygons(list(P1), ID = "a")
plot(Ps1)

I just saw some examples elsewhere but I am not able to plot a polygon of 4 corners.


texts: Is there a way to import GeoJSON into GeoServer using some extension without using PostGIS?

texts:
Is there a way to import GeoJSON into GeoServer using some extension.
I do not want to import to PostGIS, or intermediately convert to shapefiles because that looses the styles but may be that is separate issue may be with ogr2ogr.

I have installed importer and importer-bdb extension. But still format not recognized error was coming while trying to import via the REST API. Same error was coming while trying to import via importer via web interface of GeoServer.

Is there some other extension which does it?

Little background of above process. I have some R-lang scripts which creates GeoJSON (120MB) which I am trying to upload to GeoServer so that I can see results overlaid on Google Maps via WMS/WFS.


texts: Field Calculator unexpectedly results in integer or decimal, depending on input

texts:
In model build, I have the following Field Calculator tool running:

You can see in the results below that when the calculation involves a decimal, the output shows 6 decimal points, but when the input field is an integer, the result is rounded to an integer. Both input fields and the output fields are data type "double."

What am I doing wrong here? My desired result is to output the decimal, not the integer. (This is percent change, so there isn't much point in just rounding to 0, 1, or -1.)


texts: ArcGIS Server - statistics report is empty

texts:
Services on our DEV server are slow and I would like to figure out why using the statistics reports in ArcGIS Server Manager. But the reports I see are empty, unlike those in our TEST, ACC and PROD environments (see picture below). I have checked the ArcGIS Server Administrator Directory and all settings for usage reports are identical in all environments (see second picture below). Any idea why?

We use ArcGIS for Server 10.3.1 on a Windows Server 2012 R2 Standard.

I've also asked this question on GeoNet.


texts: Calculate feature ranks within ESRI table

texts:
I have a line feature class of streets that has been intersected with overlapping polygon "selection areas".

For each selection area, I aim to calculate the rank (1-n) for the streets from longest to shortest within the selection area as I have done for the selected records in the image below.

I had naively suggested that it would be a quick "summarize" operation, but now that I'm actually working on it, there is no built-in function as far as I can tell.

I have tried to manually iterate through summarizing "selection area" for the maximum length value, but this is prohibitively long at best. And at worst, I miss a step along along the way and have to start over.

Can you suggest a field calculator function that will calculate the length rank of each street for each selection area?

UPDATE:
I can do this in excel as follows, so I can move forward in my task.  But I do still want to know if/how I can do this in the field calculator interface or ArcMap in general

=1+SUMPRODUCT(($B$2:$B$13469=B40)*($C$2:$C$13469>C40))


texts: Splitting lines automatically at specific distances using ArcGIS Desktop?

texts:
I have a set of polylines which I need to split at varying distances from their starting points.

In general, I'm looking for a something similar to the SPLIT function within the editor tool. There it is possible to specify a certain line length where the split should be applied.

For instance: I have a line A of 3200m length, that I need to split into two separate geometries, one from 0 til 1700m, and one from 1700m til 3200m.

Can this be done in ArcGIS Desktop?

I'm using ArcGIS Desktop 9.3.1. on WinXP with Python 2.7.2.


texts: I try to mask a raster with gdalwarp and I always get the answer: cannot compute bounding box of cutline. what is wrong with my cutline shapefile? or what requirements should it have to work?


texts: I have two csv files which each have a field containing the same feature type but with different field names. I need to compare the values of these fields in the two files to find out where there are differences? How do I do this in FME.


texts: How to create a Domain using coordinates, grid size and depth data?

texts:
I am using qgis and I am trying to create a domain which will have unstructured grids of approximate resolution of 0.25 degrees. I have a region bounded by coordinates(wgs84) (82,7), (82,11), (92,11), (92,7).

I need to keep the bathymetry constant i.e. 1000 metres. The grid size needs to be 0.25 degrees?

How can I create this domain?


texts: OpenLayers 3 - Forcing layer source to request tiles on parameter change

texts:
In my OL3 application at present I have many OL Tile layers that use the same Source object. This source is a TileArcGISRest. The idea is that when users turn layers on/off I build up the layers param and update the source so that the system is only making one request to the ArcGIS server for images.

I'm doing this by watching for the layer visible change event, finding all visible layers and then constructing the param query like so:

/* Construct layers parameter */
var layersParam = 'show:';
for(var i = 0; i < visibleDataLayerIds.length; i++) {
    if(i != 0) {
        layersParam += ',';
    }
    layersParam += visibleDataLayerIds[i];
}

source.updateParams({
    'layers': layersParam
});
source.dispatchEvent('change');

The issue here is that OL still uses cached tiles even after the parameters have changed and I manually dispatch a 'change' event. For example I can turn on a layer and have it display fine, then if I turn off the layer and turn on a different layer without navigating OL will bring back tile images containing the first layer.

I presume this is because these have been cached and OL thinks they are ok to use even though the params on the source have changed which I thought would force the layer/source to detect a change and re-request new tiles.

The workaround I have at the moment is to force the source to clear all its cache, I couldn't find a convenience method to do this so I'm doing the following:

/* Clear cache */
var cache = source.tileCache;
while(cache.count_ > 0) {
    cache.pop().dispose();
}

This feels quite nasty and at present I don't know if this is going to have any adverse affects, it is having the desired affect at present and forcing new tiles to be requested.

So my question is this: is there a better way to do this? It feels odd that after changing the params and firing a 'change' event OL still decides that cached images from a previous call using a different param string are ok to use.

Also as an aside is it possible to get OL not to remove a tile until it has fetched its replacement? Or is that the normal behavior and because I'm clearing the cache the tiles all disappear at once and then get re-requested?


texts: How to load a *.qgs file in a C++ QGIS standalone app?

texts:
I'm using QGIS-2.4.0 API to develop a standalone app by C++.

I saved a test.qgs file in QGIS Desktop software, in the project, there was one layer and it was visible.

Then I loaded the test.qgs project file in app, but there is nothing showed.

Why is that?

The code I'm using to open the project is:

QgsApplication app(argc, argv, true);
QString myQgisDir = "C:\\Program Files(x86)\\qgis2.4.0";
app.setPrefixPath(myQgisDir, true);
app.initQgis();

//The set of mapcavas
QgsMapCanvass *myMapCanvas = new QgsMapCanvas();
myMapCanvas->enableAntiAliasing(true);
myMapCanvas->setCanvasColor(Qt::white);
myMapCanvas->setVisiable(true);

//Open *.qgs project and read
QString myProjectPath = "E:\\QGIS\\Pro\\test.qgs";
Qgsproject::instance()->setFileName(myProjectPath);
bool isRead = QgsProject::instance()->read();    //In Debug mode, isRead equals TRUE.

Can somebody help me out?


texts: How to prevent the map from panning when scrolling the page

texts:
When an HTML page contains a map, and the user scrolls down the page using their mouse wheel, when the user's mouse passes over the map the page will stop scrolling while the map itself will pan. See Demo1.

I would like to emulate the behaviour detailed at A simple usability trick for Google Maps using the ArcGIS Server JS API 3.x.

That is, the page should scroll unless the user explicitly drags within the map, in which case the map should pan.

The behaviour is almost there in Demo2, where the page scrolls even if your mouse is over the map.

map.on("load", function(){
  // Disable navigation by default, so scrolling the page doesn't scroll the map
  map.disableMapNavigation();

  // When the user tries to pan the map, allow this
  map.on('mouse-drag-start', function(){
    map.enableMapNavigation();
  });

  // Restore the no-scroll behaviour when the mouse leaves the map
  map.on('mouse-out', function(){
    map.disableMapNavigation();
  });
});

However, the map pan is not enabled unless you first click once within the map, release the mouse button, and then pan. Is it possible to achieve the seamless effect shown with Google Maps in the blog post?

I tried the mouse-drag, mouse-drag-start and mouse-down events but the behaviour is the same for all events.


texts: Render the point shapefile and raster layer together as single image

texts: I have a point layer as one shapefile and MrSid file as raster layer. How to overlap these two layers and clip the merged layer and render it as an output image file?


texts: WGS point to WGS line segment (great circle) distance

texts:
How would I go about resolving this in C#?

I have a line segment (great circle distance) defined by two Lon-Lat pairs (call them points A and B).
A third point somewhere on the Earth sphere.

The line segment closes the shortest distance between A and B.
Third Lon-Lat pair is the point C.

How do I calculate the distance between the point C, and the closest point on the AB segment?

EDIT:
In fact, I am looking for an algorithm to find the spherical distance between an arbitrary point C and a geodesic segment AB.

What i have for now:

public static float DistanceInKilometres(PointF A, PointF B, PointF C)
{
    var d13 = Haversine_KM_F(A, C);
    var R = 3961.3;
    var brng12 = Bearing(A, B);
    var brng13 = Bearing(A, C);
    var dXt = Math.Asin(Math.Sin(d13 / R) * Math.Sin(brng13 - brng12)) * R;
    return (float)dXt;
}

public static Double Bearing(PointF coordinate1, PointF coordinate2)
{
    var latitude1 = coordinate1.Y.ToRadian();
    var latitude2 = coordinate2.Y.ToRadian();
    var longitudeDifference = (coordinate2.X - coordinate1.X).ToRadian();
    var y = Math.Sin(longitudeDifference) * Math.Cos(latitude2);
    var x = Math.Cos(latitude1) * Math.Sin(latitude2) -
    Math.Sin(latitude1) * Math.Cos(latitude2) * Math.Cos(longitudeDifference);
    return (Math.Atan2(y, x).ToDegree() + 360) % 360;
}

private static float ToRadian(this float angle)
{
    return (float)(Math.PI * angle / 180.0);
}

private static float ToDegree(this float angle)
{
  return (float)(Math.PI * angle / 180.0);
}


texts:
I was interested in creating a mapping application in the iOS environment. I have looked at what ESRI has to offer, but I am interested in open source. Could anybody suggest any documentation or point me to some place where I could start learning how to create such apps?

Thanks.


texts: Consuming WMTS from Planet for ArcGIS Desktop?

texts:
I have registered a trial account with PlanetLab to evaluate the basemap product. I could login to my account and can use the Explore (web). However, could not connect to the WMTS to use my account with ArcGIS Desktop 10.2.

Does Planet allow me to connect to WMTS with my trial account?


texts: Raster Calculator to extract elevation and slope conditions in ArcGIS for Desktop?

texts: I've got a DEM ("ASTER_Nepal.tif") and a slope ("ASTER_Slope.tif") and am trying to create a new raster for elevation values between 2000 & 7000m and between 5 & 60 degree slope. I've tried to use the raster calculator but the expression escapes me and I cannot get it to work!


texts: Correcting Thiessen Polygons output from ArcMap

texts:
I am try to divide irregularly shaped polygons at specific points. I don't have any fields that inform the angle at which the polygons should be divided. Based on the Split polygon based on point feature at GeoNet, I am trying the Thiessen Polygons + Intersect approach, and it's almost working.
In the screenshot below, the orange is my "irregularly shaped polygon" and blue at the Thiessen Polygons created from the green points.

Below has a general sketch of my desired outcome, the gray polygons, just sketched in PowerPoint.
Is there a way to make the Thiessen Polygons more like the gray polygons than the blue polygons?
Ultimately I am interested in the interseciton of the orange polygons and gray polygons.

I am using ArcMap 10.7 with an Advanced level license.


texts: Spatial joining one to many within distance using ArcMap?

texts:
I have two datasets, the dataset A contains the main information, I want to join all the points from dataset A to all the points in dataset B within 150 meters.

From dataset B I need to keep two variables (id, category). I also need to know for each point A how many points B are joined.

I tried with buffer and spatial join with ArcGIS (ArcMap 10.5) but it failed.

I created a buffer around the dataset A, and then I did a spatial joint with the feature "intersect", the option "keep all target features", got an

  "ERROR 000426: Out of Memory" and "Failed to execute (SpatialJoin)

I also did a spatial join with the feature "within a distance", the option "keep all target features", got an

  "ERROR 000426: Out of Memory" and "Failed to execute (SpatialJoin)

I also tried without the option "keep all target features" and by subsetting my database, and I got the same error message.


texts: Unable to access https enabled OGC WMS service in Portal for ArcGIS 10.4.1

texts:
OGC WMS service is published on WebLogic 10.3 (https enabled). We are able to access OGC WMS service deployed in web logic server through browser and secured connection was established successfully.

WebLogic is installed and configured in Windows server

While adding above https enabled OGC WMS service as an item in ArcGIS for portal getting below error.

Few points to note-

ArcGIS for Portal 10.4.1 is installed and configured in Linux SUSE Enterprise 12
ArcGIS Web Adaptor is sitting on Apache Tomcat 8.039 web server
All SSL certificates are configured properly in Portal for ArcGIS 10.4.1
I am able to access the https enabled OGC WMS Service successfully in ArcGIS for Desktop 10.4.1
I am able to register same OGC WMS Service with unsecured connection in Portal for ArcGIS 10.4


texts: Dissolving reprojected features split into two parts by international dateline (180 degrees) in QGIS

texts:
I am trying to view the World EEZ polygon from Marine Regions.org, but centered on the Pacific Ocean.

To centre the EEZ map on the Pacific ocean I followed these steps. The custom CRS from this is:
    +proj=robin +lon_0=-150 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs

So far, so good.

However, I would then like to dissolve the shapefile so that the parts of EEZ's which were originally split by the projection separated at 180, but which actually share attribute information, are one part, without the split where they would be separated under the original projection.
This can be seen in the EEZ of New Zealand and nearby EEZs.

I have tried:
1) Eliminate sliver polygons
2) Dissolve, by a common attribute (EEZ Name, e.g. 'New Zealand').

I also tried save the shapefile to the new projection, but when I try to use the dissolve or sliver processes on this, the temporary file QGIS creates a warning saying 'projection not identified, reprojected to WGS84', and the polygons do not appear.

This answer does not work for me, which may be because I am using a custom projection which QGIS does not recognise.


texts: Raster to polygon with RGB composite using Arcgis

texts:
I am trying to convert an RGB composite to a shapefile to use with. The raster to polygon function returns with three shapefiles with "grid_code" of the value of each of these three channels. I am wondering if there are easier ways to combine them into one shapefile with a unique value for each color? Or can I do anything to transform the RGB composite raster into one that contains a unique value for each color before the raster to polygon exercise?

Edit: I have a raster of world solar intensity consisting of about 10 colors which indicates the solar intensity categories of pixles. The raster is in RGB composite form. What I want to do is to create a polygon shapefile out of this raster. However the shapefile generated by raster to polygon function of arcgis contains only information on R channel.


texts: OpenLayers 4 Modify - There is an option to show the feature vertexes as point always?(not hover)

texts:
Using the modify interaction - the default behaviour is to show existing vertex as point when hover it.

(When the mouse is hovered over the left bottom vertex - the vertex is shown)

Is there an option to always show the existing vertices?

link: https://jsfiddle.net/cc742av3/

      var polygon  = new ol.Feature(
            {
                geometry: new ol.geom.Polygon([
                [[37154.73247527378,6059120.393550643],
                [503114.85690170806,6060343.386003206],
                [525128.7210478389,5637187.99741647],
                [29816.777759896824,5656755.876657475],
                [37154.73247527378,6059120.393550643]]
                ])
            }
        );
       var layer = new ol.layer.Vector({ source: new ol.source.Vector({features: [polygon]})})
var modifyInteraction =  new ol.interaction.Modify(
  { features: new ol.Collection([polygon])
  });

var map = new ol.Map({
        target: 'map',
        interactions:[modifyInteraction],
        layers: [
          new ol.layer.Tile({
            source: new ol.source.OSM()
          }),
          layer
        ],
        view: new ol.View({
          center: [227941.55507507361 , 5912361.299243105],
          zoom: 6
        })
      });


texts: I have an 282 .laz  tiles for a large area. The aim was to extract the DSM and DTM data in .asc  format to hopefully get building heights from them. I used lastools to convert them the DSM .laz  data to .asc  files. This worked great, but now when I view this .asc data in QGIS, it looks like the height information isnt calibrated to the same datum (apologies for not using the right terminology) Is there a way to ensure that all the tiles have uniform height reference?


texts: How to export one shapefile per shape in shapefile?

texts: I have road shapefile consists of Road No. Suppose i have a road network consisting of 125 roads. I need to get 125 individual shapefiles from one road network shapefile without select one by one. Is it possible to do?


texts:
I have a dataset containing GPS points I store in a table with a geometry column. I use the following code to populate my table.

CREATE TABLE STOPS_GEO
(
stop_id TEXT PRIMARY KEY,
stop_desc TEXT,
stop_place TEXT,
pole_key TEXT,
stop_operator TEXT,
stop_lat DOUBLE,
stop_lon DOUBLE
);

SELECT AddGeometryColumn('STOPS_GEO', 'stop_geometry', 31370, 'POINT', 2, 1);

INSERT INTO STOPS_GEO (stop_id, stop_desc, stop_place, pole_key, stop_operator, stop_lat, stop_lon)
SELECT  stop_id, stop_desc, stop_place, ('') pole_key, stop_operator, stop_lat, stop_lon
FROM STOPS_CSV
WHERE stop_lat IS NOT null AND stop_lon IS NOT null;

UPDATE STOPS_GEO SET stop_geometry = Transform(MakePoint(stop_lon, stop_lat, 4326), 31370);

I've created a spatial-index

SELECT CreateSpatialIndex('STOPS_GEO', 'stop_geometry');

But when I try to use the index as filter to narrow search with this kind of query no results are returned. Results are returned if I use a huge MBR Circle radius, but they are inconsistent.

SELECT *
FROM STOPS_GEO AS S
WHERE S.stop_id IN
(
SELECT ROWID FROM SpatialIndex
WHERE f_table_name='STOPS_GEO' AND search_frame=BuildCircleMbr(X(Transform(MakePoint(4.336527, 50.835705, 4326), 31370)) ,Y(Transform(MakePoint(4.336527, 50.835705, 4326), 31370)), 10, 31370)
)

When I have a look at the data stored in the spatial-index I've noticed the X and Y values don't add up with the position of my points.

How come the data stored in the spatial-index is not consistent with the input-data ? Where did it all go wrong ?!


texts: Making depth map of lake but cannot get contours to show up right

texts:
I am trying to make a depth map of a lake. I am using the contour plugin to generate contour lines. The problem I am having is that when I use the plugin the contours come out right except on the north side of the lake. They do not follow the outline of the lake on that side. I am not sure how to go about making the contours only show up inside of the lake. I have added a few screenshots of what I have.

I am not a master GIS user. I am a fisheries biologist learning to use QGIS.


texts: Showing tags (keys and values) when converting .osm to .shp?

texts:
I would like to use OSM data as shapefile so that I could do some computations. So far, I have successfully loaded the OSM file in ArcMap 10.3.1 using the ArcGIS Editor for OpenStreetMap. The attribute table only shows the primary physical features such as highway, building, natural, etc.

How do I show the other tags, like building:level, building:material, etc., in the attribute table?


texts: How to install SciPy for QGIS Standalone

texts:
A number of QGIS plugins require the Python package SciPy to be installed. This package is available using the OSGeo4W package based installer or precompiled for Windows, but is not provided as part of the Windows standalone installer.

The SciPy windows installer does not recognize the Python instance installed with the QGIS standalone install, and so will not install to it.

Can anyone provide a simple solution to installing the SciPy package into the QGIS standalone python instance that is suitable for an inexperienced python user? Any help would be really appreciated.


texts: PostgreSQL - Array of overlapping Polygon Ids

texts:
I have a database table (overlay) that has columns, id::int, intersections::int array, geom::polygon.  I have another table (images) that has id and geom columns. I am trying to populate the intersections array with the ids of the rows in the images table that intersect (and have an area greater than 0.00001). For example, if intersection A (overlay table) intersects B1, B2, and B3 (images table), I am trying to set the intersection column in the overlay table to {B1, B2, B3}. The query below is what I have come up with to accomplish this goal,

UPDATE public.overlay
SET intersections = array_append(intersections, i.id)
FROM (SELECT geom, id FROM images WHERE images.geom IS NOT NULL) i
WHERE ST_AREA(ST_INTERSECTION(ST_MAKEVALID(overlay.geom), i.geom)) > 0.000001
AND NOT ST_TOUCHES(ST_MAKEVALID(overlay.geom), i.geom)

Right now, the above query is only ever adding a single entry to the intersections column and I am not sure why. I am going to walk through what I think is occurring in the hopes that my mistake is quite evident:

UPDATE public.overlay <- The table that needs to be updated
SET intersections = array_append(intersections, i.id) <- use the Postgres array_append function to update the intersections column. This could also be written as SET intersections = intersections || i.id, but that does not result in the desired output.
FROM (SELECT geom, id FROM images WHERE images.geom IS NOT NULL) i <- The images table has a few entries with NULL geometries, so skip those. The results of the query are pushed into the i variable.
WHERE ST_AREA(ST_INTERSECTION(ST_MAKEVALID(overlay.geom), i.geom)) > 0.000001 <- Start of the where clause. Here compute the intersection of the overlay geometry and compute the area so slivers can be omitted.
AND NOT ST_TOUCHES(ST_MAKEVALID(overlay.geom), i.geom) <- The second half of the where clause that omits bordering (touching) polygons. This is redundant, I believe with the area check, but I want to make sure that neighbors are omitted.


texts: Return non-empty field names and attributes using Arcade function in ArcGIS Online

texts:
I'm trying to write an expression for a pop up in ArcGIS Online that will display the non-empty field names and attributes. I adapted the following script that I found online here

var returnstring = "List of All Values"+TextFormatting.NewLine
for (var i in $feature) {
    returnstring = returnstring + i + ": " + $feature[i] + "; " + TextFormatting.NewLine
}
return returnstring


texts:
FME is capable of reading and writing from and to a broad variety of data sources and formats, but is it somehow possible to read/write from/to a WebDAV resource with FME?

A cloud storage solution that uses WebDAV for document access, creation etc. can be accessed via file manager like normal directories, but trying to write directly via filemanager fails. Instead one has to write to a filesytem folder and synchronize this folder with the WebDAV ressource with a third party solution (i.e. https://www.goodsync.com)

https://en.wikipedia.org/wiki/WebDAV

There is a post in the FME knowledge center, but this has not drawn any attention yet (https://knowledge.safe.com/questions/42028/webdav-file-download.html).


texts: I have a Cesium program that makes WMS calls to geoserver layers loaded from a postgis table. From what I know Cesium can only use ESPG:4326, but my postgis table and thus geoserver layer are in ESPG:32146. Everything works fine as I'm assuming geoserver converts the SRS to 4326 before passing to Cesium but it isn't super fast. Would my Cesium program would run faster if I converted my geometry column to 4326 in my postgis table so geoserver doesn't have to do the conversion?


texts: ogr2ogr equivalent command as QGIS "save as SpatiaLite"

texts:
I have a Layer, load from a WKT file in QGIS with and geometry field called 'geometry':

This is the wkt source:

type;label;geometry
0x10e04;Rego de San Xurxo;LINESTRING(-8.00676 43.54270,-8.00953 43.54159,-8.01118 43.54088,-8.01197 43.54056,-8.01208 43.54049)
...

I load into a layer with (Layer-Add Layer->Add delimited text layer) and all OK, then i 'Save as' ->SpatiaLite.... and I get a file example.sqlite. If I load into and SQlite Browser, i can see a field called "geometry" with BLOB content.

How is the equivalent command to QGIS "save as -> Spatialite" in ogr2ogr from the originl WKT file ?

All my attempts give me a example.sqlite but with a field "geometry" with text content, and this file can not be loaded into QGIS.


texts:
I have a task where I shall quantify AIS coverage in a predefined geographical area. The AIS is a system where automated positional data is sent from ships to base stations.

I have AIS data with lat/long coordinates from a whole year, and I have the set area I shall examine. I have some ideas on how to best quantify whether there is coverage and where it is not, but I have some questions.

A place without coverage naturally has no reported positions through AIS. However, places where there hasn't been a ship in that year CAN have coverage, even though there is no reported positions from that area.

My thoughts so far is to divide the designated area into a grid with cells. I plan to check each cell. If there is a reported ship position inside that area, then there is coverage. If not, there isn't. This will essentially give an coverage % of the area. My idea is to make the grid cells sufficiently large, so that any area without ship traffic, but inside the coverage zone, will be inside a cell with ship traffic. In addition, I was thinking to show the northernmost, southernmost, easternmost and westernmost reported ship position.

My question is:
Does this sound reasonable?

How large "should" the grid cells be? I was thinking that they has to be big enough that places with no ship traffic (near shore) shall be reported as having coverage, but not that big that the coverage zone is to big.

Any other ideas on how to report the area of coverage/the area without coverage?

Edit:

Just to clarify, as I see I am a little bit vague. In most cases the place without coverage is an area with a certain length from one or more base stations. With this I mean that if I got a ship position from point B, and a ship position at point C which is east of B, where the receiver is in point A, west for B and A, it most likely is coverage between B and C as well.

A ---- B ---- C x x x x

My data is lat/long positions saved in SQLite databases. I preferably work with Python, but can use other open source GIS software as well if that is necessary. Note that this is pretty huge data, with about 100 GB of lat/long positions.


texts:
How do I get the coordinates in page units (i.e. millimetres) for a QgsComposerMap item?

I can get the upper left coordinate using pos, but can't see any method that provides access to the width and height, or the lower right coordinate.

>>> map_item = composition.getComposerItemById('map')
>>> map_item.pos()
PyQt4.QtCore.QPointF(6.0, 6.0)


texts: ArcGIS Script Tool RuntimeError: cannot open 'GPL0'

texts:
I Cannot find what this error means or what could be causing it? Script worked until I added the lines under "Set map label to containing quad name". My environment is ArcGIS 10.1 SP1, Windows 7. Here is my code:

import arcpy

#Define I/O and workspaces
arcpy.env.workspace = "FolderPath"
arcpy.env.overwriteOutput = True
mxd = arcpy.mapping.MapDocument("MXDPath.mxd")
df = arcpy.mapping.ListDataFrames(mxd)[0]
outpath = arcpy.GetParameterAsText(2)

def getAuthCode(lon):
    if lon >= -126.0 and lon < -120.0:
        authCode = 26910 #UTM Zone 10N
    elif lon >= -120.0 and lon < -114.0:
        authCode = 26911 #UTM Zone 11N
    elif lon >= -114.0 and lon < -108.0:
        authCode = 26912 #UTM Zone 12N
    elif lon >= -108.0 and lon < -102.0:
        authCode = 26913 #UTM Zone 13N
    elif lon >= -102.0 and lon < -96.0:
        authCode = 26914 #UTM Zone 14N
    elif lon >= -96.0 and lon < -90.0:
        authCode = 26915 #UTM Zone 15N
    elif lon >= -90.0 and lon < -84.0:
        authCode = 26916 #UTM Zone 16N
    elif lon >= -84.0 and lon < -78.0:
        authCode = 26917 #UTM Zone 17N
    elif lon >= -78.0 and lon < -72.0:
        authCode = 26918 #UTM Zone 18N
    elif lon >= -72.0 and lon < -66.0:
        authCode = 26919 #UTM Zone 19N
    else:
        authCode = 4326 # WGS84
    return authCode

#Create extent/spatial referenece objects
lat = arcpy.GetParameterAsText(0)
lon = arcpy.GetParameterAsText(1)
WGS84 = arcpy.SpatialReference(4326) #Creates spatial reference variable to switch back to later
UTM = arcpy.SpatialReference(getAuthCode(lon))
df.spatialReference = WGS84 #Set spatial reference to WGS84
resetPT = arcpy.Extent(-97.747957, 30.280553, -97.747957, 30.280553)

#Set map label to containing quad name
point = arcpy.Point(lon, lat)
ptGeo = arcpy.PointGeometry(point, WGS84)
quadPath = "LayerPath.lyr"
quadLyr = arcpy.mapping.Layer(quadPath) #arcpy.mapping.ListLayers(mxd)[0]
selectedLyr = arcpy.SelectLayerByLocation_management(quadLyr, "INTERSECT", ptGeo)
cursor = arcpy.da.SearchCursor(selectedLyr, "QUAD_NAME")
quadName = ""
for row in cursor:
    quadName = str(row)
label = arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT", "Label")[0]
label.text = "NWI Map" + "\n" + "Quad: " + quadName[3:-3] + ", TX"
label.elementPositionX = 0.3
label.elementPositionY = 0.3

#Pans to centerpoint and sets scale to 1:12000
extent = arcpy.Extent(lon, lat, lon, lat)
df.panToExtent(extent)
df.spatialReference = UTM #Temporarily set spatial reference to correct UTM zone
df.scale = 12000
arcpy.RefreshActiveView()

#Export map to ES# folder
arcpy.mapping.ExportToPDF(mxd, outpath, resolution=300) #exportToPDF

#Reset extent/spatial reference
df.spatialReference = WGS84
df.panToExtent(resetPT)
arcpy.RefreshActiveView()

mxd.save()


texts: Use UpdateCursor in combination with .distanceTo method in ArcPy

texts:
In a given city a line is constructed, and for every building in that city it is required to know the distance to that line. Therefore the .distanceTo method from the ArcPy Geometry class is used. It is also required that this distance is multiplied by 1.2.

The following code is written using ArcPy (10.4):

from arcpy import *

# A new attribute is first created to populate the distances with
AddField_management('buildings', 'distanceField', 'LONG')

buildingCursor = UpdateCursor('buildings', '#', '#', ['SHAPE@'])
lineCursor = SearchCursor('line', '#', '#', ['SHAPE@'])

for building in buildingCursor:
    buildingGeometry = buildingCursor[0]
    lineGeometry = lineCursor[0]
    distance = buildingGeometry.distanceTo(lineGeometry) * 1.2
    building.setValue('distanceField', distance)
    buildingCursor.updateRow(building)

del buildingCursor, lineCursor, building

The code returns an error. The error message is:

AttributeError: Object: Error in parsing arguments for UpdateCursor

How can I make this code work as intended?


texts: Checking if domain already exists using ArcPy?

texts:
I am trying to check the existence of domains in my file geodatabase which contains 4 domains (automatically populated after I created some annotation feature classes). My code is as follows:

import arcpy

workspace = env.workspace = r"Z:\Test.gdb"

desc = arcpy.Describe(workspace)
domains = desc.domains

for domain in domains:
    if arcpy.Exists(domain):
        print domain

The issue I have is the behavior of the 'Exists' method'. When I set a conditional sentence to:

if arcpy.Exists(domain):
        print domain

the domains does not print. I'm thinking the code reads like 'If the domain exists, then print out the domain'. Because I have 4 domains, it should print these, but it doesn't.

I tried the reverse:

if not arcpy.Exists(domain):
        print domain

In this case, the domain gets printed out which seems counter intuitive. To me this reads like 'If the domain does not exists, then print the domain which should return nothing because it does not exist'

I want to test if any domains exists, instead of using a conditional statement to test if specific domains exist.


texts: when I make a legend in QGIS, everything shows up how it should except for one item.  The item is just a pale brown color that says "default".  I can't find this item in any of my layers and have no idea how to remove it or how it even got there.


texts: Changing Edit Sketch Symbology in ArcGIS Pro?

texts:
I am trying to change the sketch symbology for vertices in ArcGIS Pro 1.3. I know you can change the symbol from the default in ArcMap. I was wondering if there was the equivalent for Pro.

Below is the place to edit sketch symbology in ArcMap.


texts: Polyline length calculation in ArcGIS 10/VB script

texts:
I used to run this length calc on my data in ArcGIS 8 and 9, and now it don't work in ArcGIS10. Can you tell me what I have done wrong?

Dim dbllength as double
Dim pcurve as icurve
Set Pcurve = [shape]
Dbllength = Pcurve.Length
Length = dbllength


texts:
I am trying to automate a field calculation using ModelBuilder, using a GDB table to populate a feature class field given two conditions:

Traffic Count Value and
Posted Speed limit

I have created an IF statement via the field calculator but my manager does not want to have to rely on my VBA code if the table changes.
The goal being changes to the table must be made in the table and updated via the table.

I am using ArcGIS Desktop 10.3 and ModelBuilder and Excel.

Example: If PSL is between 91-100 and Traffic Count is 500-999 the value is 1

Can some sort of vlookup function work?


texts: Geometry column of new feature is not stored

texts:
var saveStrategy2 = new OpenLayers.Strategy.Save();

var vectorLayer = new OpenLayers.Layer.Vector("Vectors", {
    strategies : [new OpenLayers.Strategy.BBOX(), saveStrategy2],
    protocol : new OpenLayers.Protocol.WFS({
        url : baseurl + "/wfs",
        version : "1.1.0",
        featureType : "myLayername",
        featureNS : "myWorkspace",
        srsName : new OpenLayers.Projection("EPSG:4326");,

    }),
    renderers : ["Canvas"],

});

map.addLayer(vectorLayer);

map.events.register("click", map, function(e) {

    var latitude = position.lat;
    var longitude = position.lon;

    var marker = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(longitude, latitude), {
        draggable : true,
        name : "myName",
    }, {
        externalGraphic : url_to_png,
        graphicHeight : 50,
        graphicWidth : 50,
        graphicXOffset : -25,
        graphicYOffset : -50
    });

    vectorLayer.addFeatures([marker]);
    marker.state = OpenLayers.State.INSERT;

    saveStrategy2.save([marker]);

}

a click leads to the following wfs

<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<wfs:Insert>
<feature:myLayername xmlns:feature="myWorkspace">
<feature:null>
<gml:Point xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:4326">
<gml:pos>13.433522343635467 52.4206938584817</gml:pos>
</gml:Point>
</feature:null>
<feature:draggable>true</feature:draggable>
<feature:name>myName</feature:name>
</feature:myLayername>
</wfs:Insert>
</wfs:Transaction>

especially <feature:null> looks weird. In other Layers, this is usually <feature:geom>

Eventually, the corresponding database cell geom does not get the expected geometrical value, nut NULL instead, while the column namegets the correct value myName


texts:
I am using the OSRM 'match' service to snap GPS coordinates to the road network. I want to use the 'foot' profile, however, the OSRM server insists on providing me with car routing.

I send this request to the demo server:

http://router.project-osrm.org/match/v1/foot/12.57962,41.88137;12.58039,41.88144?overview=full

The returned polyline geometry is shown to the following image:

Instead of just connecting the left to the right point, it makes a whole route, as a car would do.

Also, whatever I type in the request url (car, foot, or whatever, it returns the same exact route). Is this a problem with OSRM server or I miss something?


texts: PyQGIS overlaying raster image on vector map correctly?

texts:
I have some code written in Python using PyQGIS where I am trying to overlay a raster image gridded with coordinates on to a vector shapefile map with the same coordinates. However, when overlaying the raster image, the image is shifted up and also seems larger than it should be compared to the vector layer.

Currently I am using self.canvas.setExtent(layer.extent()) where layer = QgsRasterLayer(filename)

Any suggestions on how to correctly overlay the raster on the vector map?


texts: How can I copy feature in ArcMap to a specified location

texts:
In ArcMap you can use the copy and paste on the standard toolbar or use the Copy Features tool on the Advanced Editing toolbar to copy the selected feature. But the former can only copy a feature to the same location (duplicate on top of), while the latter can be copied to the specific location of the mouse but cannot use the snap function so you cannot copy the feature to an exact location.

Although both methods can achieve precise positioning by feature movement after it is copied, with a great number of copies more time per operation is required. I wanted to know if there is a way to achieve in one step an exact copy of the feature to a specified location.


texts:
I am new to GIS and am trying to build an classifier for buildings using labeled satellite imagery.

I have a PostGIS database where I am storing rasters and POLYGON geom's which represent buildings. My goal is to create a numpy array for each raster where buildings are represented as 1's and everything else as 0's.

I am able to make this work by running pgsql2shp on each geom; opening a gdal driver and setting the geo_transform and projection on the driver to the same as the raster's; and then rasterizing the layer (burning the values). However, this involves an intermediate step of outputing a shapefile. I would prefer to extract each geom directly from PostGIS using a query and project onto the raster, but it seems that the relative scale is lost when I use ST_AsRaster. See below for the query I was using (I tried a few variants of ST_AsRaster, this is just to illustrate my general approach).

How can get out a properly scaled raster (or some other format I can convert to a numpy array) from my database? The image below effectively illustrates what I am trying to achieve.

SELECT ST_AsGDALRaster(ST_AsRaster(geom, 10, 10, '16BUI'), GTiff)
 FROM buildings
WHERE ST_ContainsProperly(
          ST_Polygon(
              (SELECT rast
                 FROM eightbands WHERE rid = %s), 1),
          geom)


texts: How to enable LSCV bandwidth on AniMove 1.4.2 (QGis 2.14.4)?

texts: I'm trying to make some Kernel Analysis for animals home range and the option "LSCV" of bandwidth selection isn't appearing, the plugin give me only three options (rule of thumb (Scott), rule of thumb (Silverman) and custom). How could I enable LSCV option?


texts:
I have prepared all my environmental layers and occurrence points for MaxEnt. They are all projected as WGS 1984 UTM Zone 37, all have 149 rows and 262 columns when I view in ArcGIS all of the data is overlain and no points are outside of the environmental raster layers. However, when I upload the CSV and environmental layers into MaxEnt and try to run the model it comes up with an error saying the occurrence points are outside of the environmental layers boundary.
Does anyone have a solution to this I cannot think of anything when all of the layers already spatially align and have the same properties?
Many thanks in advance.


texts: Changing projection in KML from Google Earth to Maps

texts: I have created a bunch of map tiles for Google Maps mistakenly using the Google Earth projection. Is there a tool available to batch warp the KML files to the correct projection or will I need to generate the tiles again from scratch?


texts: How does Leaflet know the spatial information of PNG files when adding tileLayers

texts: I am learning web mapping. I created tiles with TileMill, exported them to .mbtiles, and used MBUtil to unpack them. This gives me a hierarchy of folders of png files. I then added the tiles to Leaflet map using L.tileLayer('<path to top folder>/{z}/{x}/{y}.png').addTo(map). This works. I found there was a metadata.josn file at the top folder, which contains information on bounds and so on. I removed the json file, and the tile layer still works perfectly. This surprised me. Where does Leaflet get the spatial information from PNG files to decide which images to show?


texts: ArcGIS Server 10 and SQL Server 2008 R2 permissions and feature services

texts:
I have ArcGIS Server 10 with SP1 and SP2 on windows server 2008 and ArcSDE (from an edn liscense) installed on top of MS SQL Server 2008.

When I make a spatial db connection in ArcCatalog (direct connect) using DB Auth as user sde, then I change the version to dbo.Default instead of the sde.Default and the connection is in place.  When I come back to the connection later and double-click the connection, ArcCatalog doesn't retain the user and password credentials for SQL Server and I am asked with a different looking dialogue (not the normal spatial db connection dialog) to re-enter credentials.  Why would ArcCatalog not retain the info?

And how would this affect creating a feature service if at all?

Also I have the arcgissoc user with SQL Server instance login privileges as windows authentication only (not db authentication at the instance level) how would this affect creating a edit-able feature service?


texts: Access SharePoint data via ArcGIS Web AppBuilder Custom Widget

texts: I need to read and write data from/to SharePoint site via ArcGIS Web AppBuilder Custom Widget. Does anybody any experiences how to do it? I tried SharePoint REST API and putting a code from this documentation REST to my widget but I can't get to SharePoint.


texts: ArcGIS rectify image with embedded colormap (clr)

texts: When rectifying a georeferenced tif image in ArcMap 10.2 the colormap gets placed into an accompanying .clr file. Is there a way to stop this behaviour and have it embedded into the tif so it is usable in other applications? Alternatively is there a tool I can use to combine them afterwards?


texts: Generating pdf documents with geometries and raster using python

texts:
I'm looking for a way to generate PDF document containing:
1. Text in specified position
2. Raster file with border
3. Geometries overlaying raster.
Basically it should look like this

Geometries and title are stored in postgis db. Raster file is stored somewhere on my server. I could creat qgis project and use it's libraries to do that but it takes a lot of time to open qgis and generate pdf. My question is: Is it possible to generate pdf with those components using just ogr and gdal ? or maybe there is better solution.


texts:
I have a problem in converting  KML files into lyr ones with ArcGIS 10.
I do all the steps perfectly but the conversion fails and the red check mark appears. It is surprising that when I repeat the steps for more than 10 or 20 times eventually it works and the green check mark appears!
I have the same problem with different KML files. what solution do you suggest to overcome this problem?
 thanks a lot


texts: Controlling graduated classification of vector layer

texts:
I have a map layer of zip codes, I would like to display the point symbol one color if there is no data (data type is number so that would be 0). If I have a number 1-50 the zip code should be a different symbol.

QGIS seems to always automatically force the number in the low range into the high number of the preceding value range so 0-0 and 1-50 become 0-1 1-50 thus any zip code with just one as the value will not display as a zip with a value... conversely 0-0 0-50 shows all zip code as having a value.

Is there a way to set the graduate style with ranges 0-0 and 1-50?


texts: Set NA outside ROI bounds when exporting image in Google Earth Engine

texts:
I am exporting a large image in Google Earth Engine clipped to a non-quadrilateral shapefile region-of-interest.  Outside the boundaries of the ROI, I would like to set the pixel values to NA to reduce the file size.  To my understanding, GEE's default sets the pixel values outside the ROI to 0, though 0 is an actual pixel value.  So when I plot my GEE-exported raster in R:

I would like the 0 values outside my ROI to be NAs.  I would like a solution to do this either in Google Earth Engine, before I export my image, or in R.
(In R, I might do something like raster[raster <= 0] <- NA if 0 wasn't already a potential pixel value in my raster).


texts: Plugin to extract print layouts layer by layer

texts:
I need a plugin that lets me extract all the layers i have active in the file one by one as a print layout.
So when i activate the plugin it automatically gives me png files of every layer separately
i tried finding a plugin like that but couldnt find any. Does anyone know about a plugin similar to what i describe ?


texts: Separating islands into individual rasters from island chain mosaic using QGIS

texts:
I've manually created mosaics of some island chains using the SRTMGL1 v3 data, for example the Hawaiian Islands. From a mosaic, I want to create a set of separate rasters for each of the islands. (I'd be happy to also exclude 'small' islands.)

I want to be able to automate it as much as possible, as I'll eventually want to do it for a series of island groups. Using PyQGIS seems like the best option, but I am a little stuck with how to begin.

I've tried by polygonising the raster to create masks, but I need to manually select polygons from the result, and manually remove boundary polygons.


texts: Passing Leaflet object geometries to a parametric SQL view in GeoServer

texts:
I have a parametric SQL view for a WFS layer in GeoServer with the simplified form:

SELECT pts.id AS id, pts.geom as geom
FROM schema_name.points_table pts
WHERE ST_Contains(%g%, pts.geom);

I want to use this query as a filter for a Leaflet app, in which the user can edit a polygon to get only points in a defined area. Which steps are necessary to pass the geometry of my L.polygon object through the viewparams parameter into the %g% placeholder in my query?


texts: Conversion of diagonally adjacent pixels into one polygon?

texts:
I am trying to vectorize a raster whose digital numbers indicate different classes they belong to. ArcGIS and QGIS yield similar results: separate shapes out of pixels sharing the class that are adjacent only diagonally. In this sense, this question is related with this one and also this one.

I tried the suggestions posted in those questions, but none of them worked for me. I can not use the buffering-approach because my polygons refer to networks of areas; the connectivity/topology of those networks must remain intact, and I have nodes very close to each other. Dissolve is not useful either; it apparently does not work on polygons sharing a single vertex.

ILWIS could solve the issue:

I found that the vectorization tool of ILWIS (see explanation here) has an option for scanning for the 8 neighboring pixels during the targeting of each raster pixel to a polygon. ILWIS calls it "Output map 8-connected with smoothing". This might solve the issue by avoiding the polygon breakage during the vectorization when input pixels are placed diagonally.

I downloaded and installed the ILWIS version available here. However, after importing the raster I want to vectorize (I used the built-in GDAL option), the drop-down menu to select the input layer in the 'Raster to Polygon' tool does not allow me to select anything and thus I can not use the tool.

Does somebody know how to use this ILWIS' tool, or how to solve this problem?


texts:
I am following Javi's tutorial on using non web Mercator tiles and successfully followed instructions and got it all working.

However, when I change to use my projection I would like to use I get the following error:Error: Invalid LatLng object: (NaN, NaN)

I have taken the Proj4 defintion from EPSG.io for British National Grid (EPSG:27700) and EPSG:27700 is declared in the PostGIS Spatial Ref Table.

I have tried a different projection, a random Australian one and that successfully worked, so am really confused why I am getting the error.

Can anyone help?

Code:

function main() {
    var center = [51.479559, -0.241699]
    var map = new L.Map('map', {
      center: center,
      zoom: 4,
      crs: cartodb.proj('+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +towgs84=446.448,-125.157,542.06,0.15,0.247,0.842,-20.489 +units=m +no_defs', '27700')
    });

    // add cartodb layer with one sublayer
    cartodb.createLayer(map, {
      user_name: 'tjmgis',
      type: 'cartodb',
      sublayers: [{
         sql: 'select cartodb_id, st_transform(the_geom, 27700) as the_geom_webmercator from world_borders',
         cartocss: '#layer { polygon-fill: #F00; polygon-opacity: 0.3; line-color: #F00; }'
      }]
    })
    .addTo(map)
  }
  window.onload = main;


texts: Avoid sending CSS with each search in CartoDB

texts:
We’re developing a project with CartoDB and we want to show each element with a custom image.

We are doing this setting the sublayer.setCartoCSS() with something like this:

cartocss: "#map { (…) }
#map[id_elem="6f86c92a-..."]{ marker-file: url(http://[domain]/Upload/image001.png);}
// ... a lot of css ...
#map[id_elem=="6f86c92a-..."]{ marker-file: url(http://[domain]/Upload/image0XX.png);}

And it works! :)

The problem with this solution is that we have to send the CSS of all the elements in each HTTP Request, and that’s not the most efficient way.
I have tried to set a @import as CSS, something like this:

cartoDBSubLayer.setCartoCSS('@import url("http://domain.com/cartodb.data.css");');

But it didn’t work.

Is there any way to avoid sending all the CSS in each request?


texts:
I downloaded from OpenStreetMap country victor data with (mbtiles) format from this website: Openmaptiles

I need to know how I can convert this file to shapefiles so I can use it in ArcMap.


texts: Generate Point Layer at Line Intersection

texts: I have a line layer that is actually buffer polygons converted to a line layer. I would like to generate points at all places where 3 or more lines intersect. I would settle for places where 2 or more lines intersect. I know that this is possible to do if all the lines were different layers. What I need is a method to do this when all the lines are contained in a single shapefile. There are too many lines to separate them into individual files.


texts: Why is law of cosines more preferable than haversine when calculating distance between two latitude-longitude points?

texts:
In fact, when Sinnott published the
  haversine formula, computational
  precision was limited. Nowadays,
  JavaScript (and most modern computers
  & languages) use IEEE 754 64-bit
  floating-point numbers, which provide
  15 significant figures of precision.
  With this precision, the simple
  spherical law of cosines formula (cos
  c = cos a cos b + sin a sin b cos C)
  gives well-conditioned results down to
  distances as small as around 1 metre.
  In view of this it is probably worth,
  in most situations, using either the
  simpler law of cosines or the more
  accurate ellipsoidal Vincenty formula
  in preference to haversine! (bearing
  in mind notes below on the limitations
  in accuracy of the spherical model).
  Source: http://www.movable-type.co.uk/scripts/latlong.html

What is the reason why law of cosines is more preferable?

Note: The quoted text has been updated by its author as mentioned below.


texts: How does pgr_createTopology assign source and target?

texts:
This is the first time I post a question here.
I was following the tutorial from Anita Graser http://anitagraser.com/2013/07/06/pgrouting-2-0-for-windows-quick-guide/ , on a roads table which contains only 2 columns ( id , geom ). I added the columns ( source and target ) and ran the :

select pgr_createTopology('roads', 0.0001, 'geom', 'id');

the result was OK and the columns were populated.
I ran the :

SELECT seq, id1 AS node, id2 AS edge, cost, geom
FROM pgr_dijkstra(
'SELECT id, source, target, st_length(geom) as cost FROM roads',
2, 52, false, false
) as di
JOIN roads r
ON di.id2 = r.id ;

and the results were far from satisfying, none of the exemples I tried gave me the shortest path.

Can someone please explain to me where is the problem ?


texts: Assigning a different polygon edge colour to the inner edges in QGIS

texts:
Is it possible in QGIS to assign a different border type to the outer edge of multiple polygons than the inner edges.

This is achievable by dissolving the polygons, which is how I achieved it in the image below, but I would rather assign a style than keep using up storage space by creating the dissolved output.


texts:
I found this article which describes the "QGIS GUI way" for calculating the line lengths http://www.qgistutorials.com/en/docs/calculating_line_lengths.html
How can I calculate the length of one line (feature) in a vector layer with Python code?
As an example, I want to know the length of the yellow line.


texts: QTiles to generate MBTILES , pictures cutted off

texts:
I have been using the QTILES plugin to generate MBTILES from a QGIS project but the process seems to cut the icons and the text, so that they don`t look good on the MBTILES.

Is there another way to create the MBTILES or to configure the labels and icons so that they are not cut off? for example in the picture Cuerno Norte is OK but Cuerno Central is "cutted" and the same happens with some icons as the viewpoint in Guardas Camping


texts:
I want to create a workflow with a QGIS script where I need a viewshed tool. There is a really cool viewshed plugin. Unfortunately I am not able to access it in the QGIS console. I also found out that GRASS GIS 7.0 and SAGA GIS have viewshed tools. But I am not able to access them in QGIS.

Do you have an idea how I can use a viewshed tool in a QGIS script?


texts: Creating legend for different shapes and colors written with rule in one layer

texts:
I have following problem: I have diffrent locations where I found amphibians. Now I want to create a map where the form/shape of the point illustrates the specific species (waterfrog, common toad, etc.) and the fill color the stadium (adult, juvenile, etc.). I find a way doing that by using the expression string filter.
I created following codes for the geometry:
CASE
   WHEN "Art" IS  'TM'  THEN 'circle'
   WHEN "Art" IS  'WF'  THEN 'square'
   ELSE 'triangle'
END

and for the color
CASE
WHEN "Stadium" =  'ad'  THEN  '#fce8d5'
WHEN "Stadium" =  'juv'  THEN  '#ffd3el'
WHEN "Stadium" =  'Larve'  THEN  '#85b66f'
ELSE  '#0a97b0'
END

The problem now is that I want to create a legend where the diffrent forms/shapes and colors are listed as well (so far only the layer itself is listed).
So I either need a tip how to fix my legend or I need a diffrent approach to get my forms and colors.


texts: Error when starting up Postgis Manager plugin in Quantum GIS

texts:
I receive an python error when starting the postgis manager pluging in QGIS.
This problem started when moving from QGIS 1.7.0 to QGIS 1.8.0 Lisboa.
I reinstalled everything but that didin't fixed the problem.
I tried to reinstall QGIS 1.7.4 again, but still got an error.

Hope someone can help.

The error is:

An error has occured while executing Python code:

Traceback (most recent call last):
  File "C:/Users/stefanh/.qgis//python/plugins\postgis_manager\ManagerWindow.py", line 113, in dbConnectInit
    self.dbConnect(selected)
  File "C:/Users/stefanh/.qgis//python/plugins\postgis_manager\ManagerWindow.py", line 171, in dbConnect
    self.dbInfo()
  File "C:/Users/stefanh/.qgis//python/plugins\postgis_manager\ManagerWindow.py", line 238, in dbInfo
    self.updateView()
  File "C:/Users/stefanh/.qgis//python/plugins\postgis_manager\ManagerWindow.py", line 285, in updateView
    self.tabChanged( self.tabs.currentIndex() )
  File "C:/Users/stefanh/.qgis//python/plugins\postgis_manager\ManagerWindow.py", line 212, in tabChanged
    self.txtMetadata.showDbInfo()
  File "C:/Users/stefanh/.qgis//python/plugins\postgis_manager\MetadataBrowser.py", line 29, in showDbInfo
    gis_info = self.db.get_postgis_info()
  File "C:/Users/stefanh/.qgis//python/plugins\postgis_manager\postgis_utils.py", line 173, in get_postgis_info
    self._exec_sql(c, "SELECT postgis_lib_version(), postgis_scripts_installed(), postgis_scripts_released(), postgis_geos_version(), postgis_proj_version(), postgis_uses_stats()")
  File "C:/Users/stefanh/.qgis//python/plugins\postgis_manager\postgis_utils.py", line 748, in _exec_sql
    raise DbError(e)
DbError: function postgis_uses_stats() does not exist
LINE 1: ..., postgis_geos_version(), postgis_proj_version(), postgis_us...
                                                            ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

Query:
SELECT postgis_lib_version(), postgis_scripts_installed(), postgis_scripts_released(), postgis_geos_version(), postgis_proj_version(), postgis_uses_stats()

Python version:
2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)]

QGIS version:
1.8.0-Lisboa Lisboa, 6416f38

Python path: ['C:/PROGRA~1/Quantum GIS Lisboa/apps/qgis/./python', 'C:/Users/stefanh/.qgis//python', 'C:/Users/stefanh/.qgis//python/plugins', 'C:/PROGRA~1/Quantum GIS Lisboa/apps/qgis/./python/plugins', 'C:\Program Files\Jahshaka\OpenLibraries\python', 'C:\PROGRA~1\Quantum GIS Lisboa\bin\python27.zip', 'C:\PROGRA~1\Quantum GIS Lisboa\apps\Python27\DLLs', 'C:\PROGRA~1\Quantum GIS Lisboa\apps\Python27\lib', 'C:\PROGRA~1\Quantum GIS Lisboa\apps\Python27\lib\plat-win', 'C:\PROGRA~1\Quantum GIS Lisboa\apps\Python27\lib\lib-tk', 'C:\PROGRA~1\Quantum GIS Lisboa\apps\qgis\bin', 'C:\PROGRA~1\Quantum GIS Lisboa\apps\Python27', 'C:\PROGRA~1\Quantum GIS Lisboa\apps\Python27\lib\site-packages', 'C:\PROGRA~1\Quantum GIS Lisboa\apps\Python27\lib\site-packages\PIL', 'C:\PROGRA~1\Quantum GIS Lisboa\apps\Python27\lib\site-packages\win32', 'C:\PROGRA~1\Quantum GIS Lisboa\apps\Python27\lib\site-packages\win32\lib', 'C:\PROGRA~1\Quantum GIS Lisboa\apps\Python27\lib\site-packages\Pythonwin', 'C:\PROGRA~1\Quantum GIS Lisboa\apps\Python27\lib\site-packages\wx-2.8-msw-unicode', 'C:\PROGRA~1\Quantum GIS Lisboa\apps\qgis\python\plugins\fTools\tools']


texts: WMSGetFeatureInfo : No feature found on click

texts:
My map displays well my WMS layers. When i try to get the feature info, the debugger tells me no feature is found features: Array[0] , length :0

I don't know if it is because of a projection issue: map is in 4326, original data is in 27563 ;
or if it comes from geoserver.

Here is my simplified code:

function init(){

        map = new OpenLayers.Map({
          'map'});

        var base_layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
        "http://vmap0.tiles.osgeo.org/wms/vmap0?", {layers: 'basic'} );
        map.addLayer(base_layer);
wmsLayers = {
            'Poly':{
                geoserverName: 'workspace:name'
            },
            'Point':{
                geoserverName: 'workspace:name2'
            }
        }

        var geoserver = {
            url: 'http://X.XXX.XXX.XX:8080/geoserver/wms',
            options: {
                    isBaseLayer: false,
                    displayInLayerSwitcher:true,
                    singleTile:false,
                    opacity:0.5
                }
            };

        wmsLayerList = [];

        for (var wmsLayerType in wmsLayers) {
            wmsLayer = wmsLayers[wmsLayerType];
            // Create layer for each wmsLayer
            olwmsLayer = wmsLayers['layer'] = new OpenLayers.Layer.WMS(
                wmsLayerType,
                geoserver.url,
                {
                layers: wmsLayer.geoserverName,
                transparent:true,
                format: 'image/png'
                },
                geoserver.options
            );

            // add layer to map
            map.addLayer(olwmsLayer);

            // add to layer list
            wmsLayerList.push(olwmsLayer);
        }

        map.addControl(new OpenLayers.Control.LayerSwitcher());

        highlightLayer = new OpenLayers.Layer.Vector("Highlighted Features", {
            displayInLayerSwitcher: true,
            isBaseLayer: false
            }
        );
        map.addLayer(highlightLayer);

        infoControls = {
            click: new OpenLayers.Control.WMSGetFeatureInfo({
                url: geoserver.url,
                title: 'Identify features by clicking',
                layers: wmsLayerList,
                queryVisible: true
            }),
        for (var i in infoControls) {
            infoControls[i].events.register("getfeatureinfo", this, showInfo);
            map.addControl(infoControls[i]);
        }

        infoControls.click.activate();
    function showInfo(evt) {
        alert(evt.xy.x +', '+ evt.xy.y +', length: '+ evt.features.length);
    }
}

EDIT

geoserver log:

Request: getFeatureInfo
    QueryLayers = [org.geoserver.wms.MapLayerInfo@XXX, org.geoserver.wms.MapLayerInfo@XXX]
    GetMapRequest =
GetMap Request
 version: 1.1.1
 output format: image/png
 width height: 603,460
 bbox: ReferencedEnvelope[X : X, X : X]
 layers: XXX
 styles: green,line
    XPixel = 405
    YPixel = 232
    FeatureCount = 10
    InfoFormat = text/html
    Exceptions = application/vnd.ogc.se_xml
    PropertyNames = null
    Get = false
    RawKvp = {INFO_FORMAT=text/html, BBOX=X, X, X, X, QUERY_LAYERS= XXX, SERVICE=WMS, HEIGHT=460, REQUEST=GetFeatureInfo, STYLES=,, WIDTH=603, FEATURE_COUNT=10, VERSION=1.1.1, FORMAT=image/png, LAYERS= XXX, Y=232, X=405, SRS=EPSG:4326}
    BaseUrl = http://X.XXX.XXX.XX:8080/geoserver/
    RequestCharset = null
    Version = 1.1.1
    Request = GetFeatureInfo


texts: OpenLayers 3 drag and drop interaction with custom projection?

texts:
I am trying to add layers by using drag and drop interaction. Here is jsfiddle.http://jsfiddle.net/anuket/umdwzn10/ It almost works, I mean new layer is added, but for Geometry it gives "NaN". Geojson I used for testing is this one:

{"type":"FeatureCollection","totalFeatures":36458,"features":[{"type":"Feature","id":"testdata_geopnt.65","geometry":{"type":"Point","coordinates":[388095.34465382877,6464704.213578554]},"geometry_name":"geometry","properties":{"latitude":58.30865,"longitude":22.09077,"coord_id":948,"loc_count":4,"obs_count":0,"seq_count":2,"spe_count":2,"occ_count":0,"overall_count":4}}]}

Does this interaction support custom projections?
and second question is, does this support polygons, because seems like it does not, at least in my tests.


texts: What is the smallest contour interval possible when derived from a DTM?

texts: I am converting a 2m DTM to contours, and would like to have the smallest interval possible.  Is there a theoretical limit, or even a rule of thumb for defining contour intervals based on the resolution of the source data?


texts: errors with gdalUtils::gdaltransform inside R (status 1, NAs)

texts:
I am using rgdal and gdalUtils in R and I am having problems with gdaltransform (which takes a 2 column matrix of coordinates and performs a transformation to a new CRS, from a given CRS) - this is an R wrapper for the GDAL function.

However I am having no luck in getting gdaltransform to run:

(R 3.4.4 64-bit, RStudio 1.0.153, Windows 10, packages = rgdal_1.2-16, gdalUtils_2.0.1.7, rgeos_0.3-26, gdal installed via OSGeo4W, GDAL_PATH set to C:\OSGeo4W64\bin)

# example taken from ?gdaltransform
# create points, check gdal installation and run function

gdal_setInstallation()
valid_install <- !is.null(getOption("gdalUtils_gdalPath"))
if(valid_install)
{
pts <- matrix(c(177502,311865,177503,311866),ncol=2,byrow=TRUE)
gdaltransform(s_srs="EPSG:28992",t_srs="EPSG:31370",coords=pts,verbose=TRUE)
}

Checking gdal_installation...
Scanning for GDAL installations...
Checking Sys.which...
GDAL version 2.2.1
GDAL command being used: "C:\OSGeo4W64\bin\gdaltransform.exe" -s_srs "EPSG:4326" -t_srs "EPSG:27700"   < C:\Users\xxxx\AppData\Local\Temp\Rtmp4SWk5F\file16004a1a1ef6
     [,1] [,2] [,3]
[1,]   NA   NA   NA
[2,]   NA   NA   NA
[3,]   NA   NA   NA
[4,]   NA   NA   NA
[5,]   NA   NA   NA
[6,]   NA   NA   NA
[7,]   NA   NA   NA
Warning messages:
1: running command '"C:\OSGeo4W64\bin\gdaltransform.exe" -s_srs "EPSG:4326" -t_srs "EPSG:27700"   < C:\Users\xxxx\AppData\Local\Temp\Rtmp4SWk5F\file16004a1a1ef6' had status 1
2: In matrix(as.numeric(unlist(strsplit(cmd_output, split = " "))),  :
  NAs introduced by coercion
3: In matrix(as.numeric(unlist(strsplit(cmd_output, split = " "))),  :
  data length [19] is not a sub-multiple or multiple of the number of rows [7]


texts: How to move points in a polygons when editing/adjusting the polygon

texts: I am using QGIS 2.14.3 and I am editing a few polygons in a layer, however in another layer I have some points (one or two points overlapping each polygon). Is there a way to move the points automatically when editing the polygon? I tried to use the snapping option by setting topological editing to enabled but it did not work for me.


texts: How to get the hostname for published services for particular arcgis credentials

texts:
I have been creating a desktop application using Rest API.

I have ArcGIS account credentials on which I have posted some maps and layers. In my application, when I sign in to ArcGIS using my ArcGIS credentials, I need to know the hostname where my maps/layers are published. How can I get that. For one of my ArcGIS account the host name is like

https://services.arcgis.com/.........

and for another account it is like

https://services2.arcgis.com/.........

So, is there a way to figure out what is the hostname where my maps/layers are getting published?

I can definitely see the complete url of my maps/layers when I login to http://arcgis.com portal in browser and see "My Contents" which lists all my maps/layers and all that sort of stuff.


texts: Using Multiple ShapeFiles as a single address locator

texts:
Let's say I have 5 shapefiles, and I want to use them as a single address locator via the ILocator interface.  What would you recommend?

Merge the shapefiles into a single shapefile then convert to a feature class?
Merge multiple feature classes into a single feature class?
Get multiple locators and merge them into a single locator?

C# VS2010 ArcEngine 10.


texts: Leaflet search plugin for $GetJSON function

texts:
I want to make my markers researchable in JSON layers.

This is how the code looks for GeoJSON layers (imported as a .js file)

var openreach = L.geoJSON(openpoor, {
pointToLayer: function (feature, latlng) {
feature.properties.myKey = feature.properties.Title + ', ' +
feature.properties.Head
    return L.circleMarker(latlng, btMarkerOptions);
},
    onEachFeature: function (feature, layer) {
        layer.bindPopup("
"+feature.properties.Title+"

Address:
"+feature.properties.Head+"

"+feature.properties.Description+"
"+feature.properties.URL+"");

}

    }).addTo(map);

which finish:

L.control.search({
layer: L.layerGroup ([openreach]),
initial: false,
propertyName: 'myKey', // Specify which property is searched into.
zoom: 18,
position: 'topright'

})
  .addTo(map);

However, if I take into account an external .JSON file, which comes like this:

var url1 = "Peterborough.json";
var url2 = 'test.json';
var url3 = 'bt.json';

and then is assigned to:

var job;
var job2;
var job3;

in order to process with $GetJSON function like this:

$.getJSON(url1, function(data) {

    job = L.geoJson(data, {

        pointToLayer: function(feature, latlng) {

            return L.circleMarker(latlng, {
            radius:6,
            opacity: .5,
            //color: "#000",
            color:getColor(feature.properties.League),
            fillColor:  getColor(feature.properties.League),
            fillOpacity: 0.8

            });  //.bindTooltip(feature.properties.Name);
        },

            onEachFeature: function (feature, layer) {
                layer._leaflet_id = feature.properties.Owner;

                var popupContent = "
The " +
                feature.properties.Owner + " play here,
 They are in
the " +
                feature.properties.League + "
" +
                'Website
' ;

                if (feature.properties && feature.properties.popupContent) {
                    popupContent += feature.properties.popupContent;
                }
                    layer.bindPopup(popupContent);

            }

            }).addTo(map);
    });

I was attending to implement the leaflet search plugin this way:

L.control.search({
layer: L.layerGroup ([job, job2, job3]),
initial: false,
propertyName: 'Owner', // Specify which property is searched into.
zoom: 18,
position: 'bottomright'
})
.addTo(map);

Where the propertyName is assigned to one of the JSON properties...

File doesn't work at all, although only all elements underneath this snippet are gone, which means that some minor error occur somewhere.

The link to plugin is here, and as I said for GeoJSON layer works absolutely fine. How it behaves then, when we are importing a .JSON file as an URL?

https://github.com/stefanocudini/leaflet-search

If I open the Leaflet-search.js file, then at first glance I can see:

L.Control.Search = L.Control.extend({

includes: L.version[0]==='1' ? L.Evented.prototype : L.Mixin.Events,

   options: {
    url: '',                        //url for search by ajax request, ex: "search.php?q={s}". Can be function to returns string for dynamic parameter setting
    layer: null,                    //layer where search markers(is a L.LayerGroup)
    sourceData: null,               //function to fill _recordsCache, passed searching text by first param and callback in second

etc

so I replaced: url: '' with url: '.json' but without result.

Is it possible to make the leaflet-search plugin working with fetching an external URL .json file?


texts: Model runs in ArcMap but not in ArcCatalog?

texts:
I have a model I built to select and delete features, I built it so I can run it quick on multiple feature classes.

Works fine in ArcMap 10.3 but when I use it in ArcCatalog I get the error "Value Cannot Be Feature Class Raster or Mosaic Inputs Required."

My model has Select by Attribute and Delete Features with a Stop Function so it will stop if there is no selection.

Model Parameter for the Select By Attribute is set to Feature Class, have tried Feature Layer also.

I get the same results from each, it runs in ArcMap but Raster Error in ArcCatalog.

Any suggestions as to what might be going on?


texts:
I have .xml file which involves geometry data I would like to convert into .dwg/.dgn/.shp file. File is written in Danish and I am not sure if that can be a problem. I am trying to use FME software but I see errors all the time and I lost my hope.

Here is the beginning of file:

    <?xml version="1.0" encoding="utf-8"?>
<KnudeGroup xmlns="http://www.danva.dk/xml/schemas/dandas/20120102">
  <Referencesys>
    <KotesysKode>1</KotesysKode>
    <KoordinatsysKode>9</KoordinatsysKode>
  </Referencesys>
  <Knude Knudenavn="417292">
    <Ejerfordelingsnavn>HOFOR SPILDEVAND KØBENHAVN A/S</Ejerfordelingsnavn>
    <OprindXYJournalnr>9005</OprindXYJournalnr>
    <Driftsansvarlig>HOFOR A/S</Driftsansvarlig>
    <Vejkode>4476</Vejkode>
    <Husnummer>97</Husnummer>
    <BygvNavn>KB417292</BygvNavn>
    <YKoordinat>6179888.07</YKoordinat>
    <VinkelSymbol>91.1</VinkelSymbol>
    <XKoordinat>723557.54</XKoordinat>
    <TypeAfloebKode>3</TypeAfloebKode>
    <TilladTilslutKode>1</TilladTilslutKode>
    <StatusKode>1</StatusKode>
    <Statusdato>2012-04-11T00:00:00</Statusdato>
    <Kortindeks>1408</Kortindeks>
    <KnudeKode>8</KnudeKode>
    <KategoriAfloebKode>1</KategoriAfloebKode>
    <Initialer>DAN</Initialer>
    <DatoOprettet>2007-06-17T12:38:28</DatoOprettet>
    <DatoOpdateret>2017-08-12T16:25:44</DatoOpdateret>
    <DatoEtableret>1969-06-01T00:00:00</DatoEtableret>
    <Bundkote>5.91</Bundkote>
    <Bemaerkning>QA21S4; A12257</Bemaerkning>
    <BemaerkGeometri>Overløb</BemaerkGeometri>
    <DeloplandItems>
      <Delopland Deloplandnr="1">
        <Initialer>AFL</Initialer>
        <DatoOprettet>2011-07-08T13:39:34</DatoOprettet>
        <DatoOpdateret>2001-05-07T00:00:00</DatoOpdateret>
        <Bemaerkninger>417292-1 fra AFREG.AF_1101</Bemaerkninger>

Do you know what else can I do? Maybe I forgot about something important.


texts: How to convert GeoDa .GAL or ArcMap .SWM file to Matlab (.dat)?

texts:
I want to convert a spatial weight matrix from either ArcMap (.SWM file) or GeoDa (.GAL file) to an .dat Matlab file.

So far, I only found the STATA package spwmatrix to do this. But the command line
    . spwmatrix import using C:\data\wcontig.gal, wname(wcontig) xport(wcontig, dat)

only results in an error "File wcontig.dat cannot be opened" .

Does anybody know how to fix this or another way to do this?


texts:
I implemented a zoom to feature extent function in my code, it works fine in new FireFox, Chrome, and IE10, but the tester's are having troubles with it in IE8. I noticed that all the data shows up on the map and in the table, yet it doesn't zoom. What am I doing wrong? Here is where I call my zoom function.

function displayResults(results, messages) {
    var featureset = results[0].value;

    var simplePolySymbol = new esri.symbol.SimpleFillSymbol();
    simplePolySymbol.setOutline(new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([0, 96, 170, .75]), 1));

    dojo.forEach(featureset.features, function (feature) {
        feature.setSymbol(simplePolySymbol);

        resultsLayer.add(feature);
    });

    myMap.addLayer(resultsLayer);
    myMap.Search.handleStats(results, messages);

    var extent = esri.graphicsExtent(featureset.features);
    myMap.setExtent(extent, true);
}

Also my table doesn't populate in IE8, althought im seeing the values I need in the console. Here is my table code:

myMap.Search = {
    gpGetStats: new esri.tasks.Geoprocessor(gpURL),
    getRouteStats: function () {
        console.log(dojo.byId('resultsLayer').value);
        var params = {
            "ZIP_CRID": dojo.byId('resultsLayer').value
        };
        resultsLayer.Search.gpGetStats.execute(params, resultsLayer.Search.handleStats);
    },

    handleStats: function (results, messages) {
        console.log(results);

        var content = '';

        content += '
';
        content += '
 ZIP CRID 	 Bus 	 Res 	 Tot 	 &lt;200 	 DS Key
';

        dojo.forEach(results[0].value.features, function (crid, i) {
            console.log(crid.attributes.ZIP_CRID + ', ');
            content += '
' + crid.attributes.ZIP_CRID;
            content += '	 ' + crid.attributes.BUS_CNT;
            content += '	 ' + crid.attributes.RES_CNT;
            content += '	 ' + crid.attributes.TOT_CNT;
            content += '	 ' + crid.attributes.LT_200_IND;
            content += '	 ' + crid.attributes.DS_KEY + '
';
        });
        content += '
';
        dojo.byId('details').innerHTML = content;
    },


texts: QGIS Server not working (problem with fast CGI)

texts:
Is there a simple example/tutorial of how to set up QGIS Server  with the latest QGIS version on Ubuntu, I can't get a correct result (blank image)?
I think there might be some problem with my FASTCGI config on apache.

Please help me. Thanks.