texts: How to inspect consistency with two polygon which have to be the same position on QGIS 1.8.0

texts:
There are two polygons which have the common line and point in some parts.
These line and point should be the same position.

I want to know how to inspect these condition on QGIS 1.8.0.


texts: Fitting a word/tag cloud into geographic boundaries

texts:
Are there any available tools or a recommend methods for displaying a tag or word cloud (also know as wordle) onto a world map, much like in this example: Map: United States of surnames? (There may be other examples on the NY Times.)

Note that that in the example above, word are located by fixed coordinates, whereas text clouding might be implemented with the wordle algorithm (as described on SO) in an automatic manner. So, is there a software that let you put words at random on a given country, or do you think it's best to tweak the wordle original algorithm (e.g., by adding constraints based on predefined frontiers)?


texts:
I have two choropleth of the same area but with different concentration data and I need to overlap them. My aim is to highlight the areas of intersection between the points with the highest concentration (I use a quantile interval). It is probably only a matter of mergers, but I made a couple of attemps and the graphics quality has suffered (e.g., multiply, burn).
Any suggestions? Thanks in advance.


texts: Copy custom developed plugin from one computer to another

texts:
I have developed a plugin on a PC running QGIS version 2.18. Now I would like to installed it on another computer running QGIS version 2.14 essen.

I have tried to copy by zipping the plugin and then extracted it to the ~/.qgis/python/plugins folder as instructed in the tutorial

How to install Sextante in QGIS 1.8 without Plugin Installer?

But this technique did not work. Is there any specific method to archive the plugin folder on the source machine, or a way specify the path to the plugin on the destination machine?


texts: Determining CRS for contoured road map of England and Wales

texts:
I've been working with some old maps lately [1800-present] and I've had some difficulty identifying CRS/projection.
This map

has this

written at the bottom. Based off of this, how can I find what CRS/Projection the map is? Can you advise me something about finding CRS in general?


texts: How to create a new Spatialite database in QGIS

texts:
I've been trying to create a new spatialite database within QGIS 1.8 (SpatiaLite Version 3.0.1; QSpatialite 6.0.3) and keep getting this error: "The SQL query seems to be invalid.
no such table: views_geometry_columns" and then "This DataBase seems to be a valid SQLite DataBase but not a valid SpatiaLite One, Would you like QSpatiaLite to automatically transform it to SpatiaLite (information won't be lost) ?" and after "Yes" comes "Unable to convert Database to SpatiaLite".

What am I doing wrong? There was no problems with old version (QGIS 1.7.4 and QSpatialite 5.0.3).

Please advise regarding creating a new Spatialite database.

Spatialite-gui did the trick. You just have to have right SRID.
Here is the SRID list
http://drupalcode.org/project/geo.git/blob/ee3f75649e4b01dfd27d8e35b222a2b51c93d706:/srid.inc

Thank you all for your effort and time!


texts: Algorithm or GDAL module to calculate LOS

texts:
I'm involved in a project using GDAL via python.

We need to be able to calculate if, standing at point A it is possible to see point B, given a DEM. To clarify we do not need a viewshed algoritm, we would only like to know if there is a straight unbroken line from A to B.

Are there any well known algorithms for line-of-sight calculations?
Is there a GDAL module or python script (using GDAL) that can do LOS calculation?


texts: UpdateCursor won't update concatenated string?

texts:
I have a function I'm trying to incorporate in a model. It's supposed to check to see if one of two fields have a value and depending on the field with value calculate the other.

The issue I'm having is writing the result back into my feature using the UpdateCursor. I don't have any experience using it, and not sure if it's the right tool for the job. Here's my function:

import arcpy

upCursor = arcpy.da.UpdateCursor("SepticTankPermit layer", ['pid','pidgis'])

def autoCheck():
 with arcpy.da.SearchCursor("SepticTankPermit layer",['pid','pidgis']) as cursor:
 for row in cursor:
  if row[0] is 'NULL' or row[0] == '':
    pidgis = row[1]
    upCursor.updateRow([pidgis[:2]+'-'+pidgis[4:6]+'-'+pidgis[6:7]+'-'+pidgis[7:10]+'-'+pidgis[10:13]+'.'+pidgis[13:]],[pidgis])
  elif row[1] is 'NULL' or row[1] == '':
    pid = row[0]
    upCursor.updateRow([pid],[pid[:2]+'00'+pid[3:5]+ pid[6:7]+ pid[8:11]+ pid[12:15]+ pid[16:]])
  else:
    print "PID or PIDGIS must have a value in order to execute properly!"

I'm not sure if I'm using it correctly.


texts:
I'm forced to crawl out of my intranet and create a public GIS site with quite an extensive dataset.  All of my data is contained within PostGIS.  I started dabbling with Geoserver/Postgis/OpenLayers and find it quite easy to work with but perhaps a little more difficult to merge into a full blown website with security, etc...

So I've come across GeoDjango and I have enjoyed the python programming I've undertaken thus far.  Has anyone used a GeoDjango/Postgis/OpenLayers combination?  How fast is GeoDjango in serving data?  Do you know of any professional websites I can browse that are built with GeoDjango?  I've found it hard to find any demonstrations on the net.


texts: How to preserve the color of a line pattern fill color in categorized vector layer?

texts:
I am applying different colors to a vector layer. Now I wanted to improve it, and get some items also with a crossed pattern. I want to have the hatching black, and the colors remaining. All I can get, is the hatching in the same color as the fill - despite having it in the symbol set to black. At the link below, a screenshot can be found.

Any ideas what I could be doing wrong?


texts: How to edit a legend for WMS map in layout

texts: I'm working on a project in QGIS and I'm trying to edit a legend for a WMS map in a layout (see pic below). From what I read the legends for WMS maps are provided as images and therefore they cannot be edited. Is there any kind of workaround for this?


texts: Why when I do an intersect analysis on a point feature class to a line feature class I only get 'one' point result?

texts: ArcGIS Pro. I've merged my point feature classes of species and have gone to run an Intersect Analysis on these with a line (river) feature class. However, I only receive one point in the output and I know there is hundreds....


texts: ST_Intersects returns true while ST_Contains returns false for a point located outside of polygon

texts:
I am seeing some inconsistent results with the below query. We are testing if a point intersects a multipolygon. ST_Contains returns false as expected but ST_Intersects returns true incorrectly. The point is way outside of the the search area as shown in the map below. Any idea what might be wrong here?

Full Query - https://pastebin.com/raw/qq0qGwgg

SELECT ST_Intersects(box, point) intersects, ST_Contains(box, point) contains
    FROM (
     SELECT ST_Buffer(ST_GeomFromGeoJSON('{"type":"MultiPolygon","coordinates":[[[[-89.963802,43.09416],
      [...coordinates truncated for brevity...]
      [-89.549422,43.081271]]]]}'), 10) As box,
     ST_Buffer(ST_GeomFromText('POINT(-89.7766 43.5287)'), 20) As point) As foo;


texts: How to make editable polygons in Google Maps?

texts:
I've just recently started learning Google maps, JavaScript, etc., and have a few questions about a project that I'd like to do. I'm wanting to take some ESRI shapefiles, convert them to KML, and then make it so that they can be edited online through Google Maps. I'm okay getting them from shapefiles to KML, but unsure about what the best way is (or if it's possible) to make them editable.

Here are some more details:

I don't mind if the data are transmitted/stored on Google's servers--as they are not confidential.
I just need to be able to have polygons on an embedded Google map that can be saved/stored and edited on a monthly basis. The end goal is the be able to answer, "In which zone does this address fall?".
I want to be able to do a local search on the page, and then see in which polygon the address falls.
The ability to set up buttons that would allow me zoom to specific polygons and print them would be a plus.

I've checked out Google Map Maker, as well as Google My Places. I think My Places might work, but I would definitely need to make some tweaks.

Thanks!


texts: export shapefile to spatialite hangs qgis

texts:
I have a shapefile layer containing 9 points. The attribute table has a string column (max 18 chars) and a real column. The .dbf file is ~4KB, all the other files are 1KB. I right-click on the layer, select Save As and set the type to Spatialite, assign a file name, then click OK. The process just runs and runs. No error. If I look at the file, it's growing about 2KB every couple of seconds. I killed it when it passed 2.5MB. I've tried this a couple of times and the same thing happens consistently.

Any suggestions about what to try next?

[edit]
The problematic shapefile can be found here

QGIS version    2.0.1-Dufour
QGIS code revision  d94c044
Compiled against Qt 4.8.5
Running against Qt  4.8.5
Compiled against GDAL/OGR   1.10.0
Running against GDAL/OGR    1.10.1
Compiled against GEOS   3.4.2-CAPI-1.8.2
Running against GEOS    3.4.2-CAPI-1.8.2 r3921
PostgreSQL Client Version   9.2.4
SpatiaLite Version  4.1.1
QWT Version 5.2.3
PROJ.4 Version  480
QScintilla2 Version 2.7.2

Windows 7 Pro, 64 bit


texts: Sum of image values for three consecutive images in collection GEE

texts:
I have a collection of 457 images, where each image is the total precip in a month, 1981-present.

I want to find the total precip in each quarter i.e. reduce three consecutive images by sum thereby producing another image collection of sie ~ 152

I have the below code, but I am unable to iterate it through all the images

var listofmonthlyprecip = collection.toList(collection.size());// convert collection of 457 images into a list
print (listofmonthlyprecip);

var trial1 = ee.Image(listofmonthlyprecip.get(0));// Jan 1981
var trial2 = ee.Image(listofmonthlyprecip.get(1));// Feb 1981
var trial3 = ee.Image(listofmonthlyprecip.get(2));// Mar 1981

var imgcollection = ee.ImageCollection([trial1, trial2, trial3]); //make collection of first three months
var quarter_trial = imgcollection.reduce(ee.Reducer.sum());// add values
print (quarter_trial);
Map.addLayer (quarter,{min:0, max: 1143}, 'first quarter'); map

How do I iterate through all images to get sum of values for groups of 3 consecutive images?


texts:
Is there a way to add a text buffer or stroke the text on the scale bar?

Its impossible to read the scale when its set on a map with dark colours.


texts: Print composer changing orientation when saved to a template

texts: I am having an issue while creating a template. When I save my Print composer to a template for my peers to use, the orientation is not saved. I have changed the orientation from landscape to portrait, and then save the template and close it. when I reopen the template, the orientation automatically changes back to portrait. If I then change it back to portrait, my text boxes surrounding my map data frame are redistributed. I added a formula @layout_pagewidth = 210 and @layout_pageheight = 297 in an attempt to make the orientation permanent with no resolve.


texts:
I am trying to add a Python script in a toolbox to discover the number of records of some shp files stored in a folder.

I wonder that the script works pretty good as stand-alone in the Python command line of ArcMap; but it returns an error when imported in a toolbox.
From the stand-alone script I changed only the workspace as arcpy.GetParameterAsText(0).

I am aware that the point should be somehow WHERE to print the results (I learned in the geoprocessing results(?)), as there is no command line; and I also tried to use AddMessage instruction instead of 'print', but unsuccessfully.
This is the script imported in the toolbox:

>>> import arcpy
#define workspace
arcpy.env.workspace = arcpy.GetParameterAsText(0)
#create a list of objects to loop through
FC = arcpy.ListFeatureClasses()
#loop throw every object
for SingleFC in FC:
#call function
 count = arcpy.GetCount_management(SingleFC)
#print results
 print('{} has {} records'.format(SingleFC, count[0]))


texts: How to get ArcPy parameter of type Folder shown in Textbox?

texts:
Writing an ArcPy toolbox for ArcGIS Pro I am having the issue that the declaration of the following code does give me a browse button and the associated textbox. However, using the browse button, and selecting a folder, does not lead to the selected folder shown in the associated textbox.
lyr04 = arcpy.Parameter(
                displayName="LYR directory",
                name="lyrx_dir",
                datatype="DEFolder",
                parameterType="Optional",
                direction="Input"
                )

Am I missing a cast, declaration or property definition?
I am using ArcGIS Pro 2.5.1 and Python 3.6
Here the code of a *.pyt:
# -*- coding: utf-8 -*-

import arcpy

class Toolbox(object):
    def __init__(self):
        """Define the toolbox (the name of the toolbox is the name of the
        .pyt file)."""
        self.label = "Toolbox"
        self.alias = ""

        # List of tool classes associated with this toolbox
        self.tools = [Tool]

class Tool(object):
    def __init__(self):
        """Define the tool (tool name is the name of the class)."""
        self.label = ""
        self.description = ""
        self.canRunInBackground = False

    def getParameterInfo(self):
        """Define parameter definitions"""

        lyr04 = arcpy.Parameter(
                displayName="LYR directory",
                name="lyrx_dir",
                datatype="DEFolder",
                parameterType="Optional",
                direction="Input"
                )

        params = [lyr04]
        return params

    def execute(self, parameters, messages):
    """The source code of the tool."""
        return


texts: How to designate a polygon as range on a TIFF file and take the raster data which in this range?

texts:
In GeoTools, GridCoverage2D.evaluate(DirectPosition coord, int[] dest) can get the raster data in specified location. It's powerful, but I want to get some raster data in a spatial range.

I try to use the

RenderedImage ri=GridCoverage2D.getRenderedImage() ;

ri.getData(Rectangle rect);

to get the raster data in a rectangle, but class Rectangle can't represent the other spatial range like circular or other polygon. It seems to have this function in ArcGIS.

Has any method in Java to get the data in a specified range of the TIFF file ?


texts: How to stack rasters for ecological analysis?

texts:
The attached image shows two different forest openings.  Each opening has the following layers associated with it:

Point shapefile 1 = A red X which represent a large "legacy" tree in the gap
Point shapefile 2 = White points that indicate sapling locations
Raster Layer = A kernel density estimate of the magnitude per
unit area of point shapefile 2

I am interested in creating a graphic that visually depicts the average magnitude per unit area between the two rasters.  Each raster has a different spatial extent.  My thoughts were to "stack" the rasters based on the location of point shapefile 1 (i.e. the legacy tree) and perform the analysis using raster algebra (e.g. Float("Raster1" + "Raster2")/2).  I should point out that the full dataset will have ~ 30 forest openings.

How can I stack these rasters so that they are centered on the legacy tree in order to perform the raster algebra?

Edit:

As @Alexandre pointed out, the solution was to georeference the rasters based on X.


texts: How to use loop to add georeferenced JPEGs from folder to mxd?

texts:
This is my first time using this site and I'm a bit new to ArcPy. I've looked around for a while but couldn't quite find the answer I was looking for. I have many folders with georeferenced topos in JPEG format and I'm trying to use a for loop to add each one to an mxd one at a time. Here's my code:

import arcpy

arcpy.env.workspace = "C:\folder path"
mxd = arcpy.mapping.MapDocument("C:\file path.mxd")
df = arcpy.mapping.ListDataFrames(mxd,"*")[0]

path = "C:\file path\\"

rasterList = arcpy.ListRasters()

for jpg in rasterList:
    path += str(jpg)
    lyr = arcpy.mapping.Layer(path)
    arcpy.mapping.AddLayer(df, lyr, "TOP")

arcpy.RefreshActiveView()
arcpy.RefreshTOC()

The path string was my way of concatenating each raster list element to the folder path to be passed to arcpy.mapping.Layer() since it accepts a file path - it managed to run without errors but I don't see any changes in my mxd. I assume this is because arcpy.mapping.Layer() accepts a .lyr file only? With this logic I tried using arcpy.MakeRasterLayer_management() within the loop but I got an AssertionError and didn't know what that meant. Anyone know where I went wrong?


texts: How to set schema on GeoServer ImageMosaic JDBC?

texts:
I've publish raster from postgis to geoserver with ImageMosaic JDBC like explained on this post and it work properly on the default 'public' schema.

But how to set a custom schema ?


texts: ArcPy merge datasets with slightly different fields

texts:
i have many (>15) shapefiles which have slightly differing fields.

s1: (Name, age, layer_1, ...)
s2: (Name, age, layer_1, layer_2, ...)
...
s_n: (Name, age, layer_1, layer_1_extra, ...)

I want to combine s1,s2 up to s_n into a new feature class/shapefile with attributes

s_merge: (Name, age, layer_1, layer_1_extra, layer_2, ...)

Field order is irrelevant. layer_1_extra should be set to ' ' or 0 depending on type, where features come from e.g. s1 ()which does not have layer_1_extra)).

Do I have to program this myself using search cursors (to get the field names), add field tool and insert cursors, or is there a way to coerce e.g. the merge tool to do what I want?

So far i tried to use the merge tool, but this fails with

arcgisscripting.ExecuteError: ERROR 001156: Failed on input OID 0, could not write value ' ' to output field SCHICHT_2

Field SCHICHT_2 is a number field, so of course arcgis can't write ' ' to it.

Code for setting the fieldMap is

for shapepath in ...:
  land_shape_paths.append(shapepath)
  fieldMappings.addTable(shapepath)
arcpy.Merge_management(land_shape_paths, land+'_full.shp', fieldMappings)

I had guessed ArcGIS was aware of field types and tried to write sensible "empty" values depending on field type. Apparently not, or my data is more botched than I think.

Any help (especially on a tool more suited to my needs than merge, or on the needed fieldMap magic) is appreciated!


texts:
I am a new user of QGIS 3.0.2.

Simply trying to select a specific land parcel using a GeoNB layer, also will need to select other features obviously in the future. My "Select Features" button is greyed out, I turned off my other layers to see if that made a difference but I can still not use the select features button.

Any suggestions?


texts: How I get the upstream drainage area? and what is the difference between drainage area and basin area?

texts: I have a Aster DEM, and from that i get the drainage network, and now i need to calculate the drainage area, but i don't know if the drainage area is equal to the basin area.


texts: Geographic co-ordinate system displayed as projected

texts:
ArcGIS suite of software categorises coordinate systems as either geographic or projected. From what I understand about coordinate systems (and I may be wrong), geographic co-ordinate systems are used to display features on a globe and projected co-ordinate systems are used to display features on a 2D plane.

How is it that when I use a GCS like WGS_1984 to display a layer of the entire earth, ArcMap shows it to me on a 2D plane? Doesn't that mean that the feature was projected.


texts:
A kind of branching of this question.

Soon I will need to handle GML Coordinate Reference Sysyem definitions in a Java servlet. Links:

GML OGC reference.
Concrete  example.

I know that GeoTools library can parse GML, and I can see in http://docs.geotools.org/latest/userguide/library/xml/geometry.html some good documentation regarding Geometry features.

I'd like to know whether I will be able to parse such definitions, and maybe translate them to WKT.


texts:
I have shapefile with about 15,000 polygons. Some polygons overlap with other polygons. Most of them don't overlap with any other polygon. I also have a points data set with about 100 Million points (lat/lng).

I need to assign polygon(s) to each of the points. If I use over function I assign only one polygon to any give point. How do I assign two or more polygons to a point if that point is in multiple polygons.

I cannot run a loop polygon-by-polygon or point-by-point because there are too many polygons and too many points. However, processing with bunch of points/polygons in every loop, like a million points in one loop and/or 1000 polygons in one loop, is OK.


texts: Feature class with attribute pick lists for values, without a Coded Value Domain?

texts:
I have a feature class with a fields I'd like to restrict to certain values. I'm aware of coded-value-domains, where I can have lookup table that translates the real-code-recorded-in-table into a human-friendly-rendering of that value, e.g.:

+-----------------+----------------------------+
| SurveyTech_Code |      Survey_Technique      |
+-----------------+----------------------------+
|               0 | Guess                      |
|               1 | Total count                |
|               2 | Stratified random quadrate |
|               3 | Extrapolation              |
|               4 | Direct photocount          |
+-----------------+----------------------------+

However what I want is to have the real-recorded-value and the human-friendly-value be the same thing. Is creating a coded value domain like the below the only way?

+----------------------------+----------------------------+
|      SurveyTech_Code       |      Survey_Technique      |
+----------------------------+----------------------------+
| Guess                      | Guess                      |
| Total count                | Total count                |
| Stratified random quadrate | Stratified random quadrate |
| Extrapolation              | Extrapolation              |
| Direct photocount          | Direct photocount          |
+----------------------------+----------------------------+

Coded Value Domains are a bit laborious to create and assign. I'm hoping for something like "select field name, type list of valid values" (well, paste actually), and then when editing or creating features just selecting from the list.

I don't care about space constraints or the (possible) performance gains from using numeric lookups as these are in a file geodatabase. Also it would make exporting to shapefile painless (not like this).


texts: Create custom pixel block size in ArcGIS 10?

texts:
I'm using the new IRawBlocks in ArcGIS 10 from the adopted sample in ArcGIS 10 SDK help and I want to create a custom sized pixel block that feeds me a block of values column by column instead of a block.  So basically I'll be looping through each column in the raster.  Any ideas as I couldn't find anything in the documentation?

        IRawBlocks rwBlocks = (IRawBlocks)rb;
        IRasterInfo rsInfo = rwBlocks.RasterInfo;
        IPixelBlock pb = rwBlocks.CreatePixelBlock();

        // change pixel blocks size here?????

        // iterate through pixel blocks
        for (int pbXcursor = 0; pbXcursor < rsProps.Width; pbXcursor++)
        {
            string line = "";
            rwBlocks.ReadBlock(pbXcursor, 0, 0, pb);

            // iterate through cells in pixel block, should only be one pixel column
            for (int pbHeight = 0; pbHeight < pb.Height; pbHeight++)
            {
                object val = pb.GetVal(0, 0, pbHeight);//pbWidth, pbHeight);
                // etc
            }
        }


texts: where styles from QGIS are saved in PostgreSQl

texts: I can save style of a layer in DB PostgreSQL. But where it is stored in Postgres? How can I find it?


texts: Using Join Field more than once in ArcGIS Pro ModelBuilder?

texts:
I have a model where I'm trying to aggregate the zonal sums of a set of ~30 rasters into attributes on a shapefile of country boundaries.  Ideally my model would create a new field in the country shapefile named raster1, and give the sum of values in raster1 within each feature.
This is my current implementation:
Yesterday, this model worked as intended, but revealed that I didn't have the NoData values properly configured on my 'production' rasters, resulting in Zonal Stats not ignoring NoData values.  I configured the inputs, ran a couple iterations manually, and things were working correctly.  But now when I run it, It fails on the second Join Field.  It says the table is not editable and Join Field fails to execute.
I still don't understand how ArcGIS Pro handles editing/locking.  I've made sure that the table does not have outstanding edits prior to running the model, but it hangs anyway.
An additional problem with this model is that the joins are all awkward variations of 'Sum' (the field name I'm joining).  I'm not sure how to incorporate the Name object from Iterate Rasters into the Join Field step so that the fields are named properly, but if anyone has input on that, that would also be great.


texts: Representing multiple attributes of single point feature with icons?

texts:
I always wondered if there's a way to represent using an array of various icons multiple attributes of a single layer containing point features.  For example, think about a point feature with these two attributes:

Primary activity:  1, 2, 3
Secondary activity: 1, 2, 3

A feature could have values for these attributes like (1,1) or (2,1) the values are qualitative discrete like data, not continuous numerical, let's say something like: 1 commerce, 2 finance, 3 health services.

I would like to represent the point with all the combination of activities in a way their activities icons arrange around or aside the point, not by overlaying separate layers with representation for each one of the activity attributes, because the overlaid icons would not be legible.

Values for attributes can't be represent by color-form combinations, they should be represented with specific icons for the activity.


texts: Cleaning shapefile with multiple boundaries defined more than once

texts:
I have a shapefile which contains a lot of polygons which define airspace. These polygons overlap and this is fine (e.g. different airspace configurations for the same airport).

My problem is that many of the polygons could share common vertex but instead they each have a minutely different list of points. This can be seen in the image below: the inner circle is defined twice with points that are almost in exactly the same place but not quite.

What I am trying to do is replace points that are currently extremely close with a single point and use this for all polygons in the layer. It's not realistic to do this manually. I've tried using QGIS dissolve and also eliminate sliver polygons but these seem to be intended for polygons that are not supposed to overlap. It's going to be difficult to convert to lines and back again without losing details associated with overlapping polygons.


texts: A hello world widget for the CMV application

texts:
I am trying to build my first widget, for use in the Configurable Map Viewer (CMV) and I want to start with something basic.
I was wondering if there is a tutorial or a step by step guide to create a simple "Hello World" widget in the CMV application?


texts: Variable iconUrl in Leaflet, use GEOJson property voor iconUrl definition (Leaflet)

texts:
My script is as follows:

function clickFeature(e, feature) {
  var layer = e.target;
  var string = new feature.properties.categorie;
  var bigIcon = new BigIcon({iconSize: [24, 40], iconUrl: +string+'.png'});
  layer.setIcon(layer.options.icon == smallIcon ? bigIcon : smallIcon);
}

var jsonLaag1 = L.geoJSON(geojson, {
  filter: categorie1,
  pointToLayer: function (feature, latlng) {
    return L.marker(latlng, {
      icon: smallIcon
    });
  },
  onEachFeature: onEachFeature,

});

function categorie1(feature) {
  if (feature.properties.categorie == '1') return true
}

function onEachFeature(feature, layer) {
  layer.on({
    'mouseover': clickFeature
  })
  layer.on({
    'mouseout': clickFeature
  })
}

It returns feature is undefined in the console
Somewhere further in my script I just can filter with the value of categorie (category in dutch) with the same definition. What goes wrong?


texts: How to create a simple front-end for a PostGIS database?

texts:
My organisation collects a lot of environmental monitoring data (stream flow, water chemistry etc.) most of which is currently stored in Excel. I’d like to get everything into a database – probably PostGIS – but I need the data to be accessible to people with no knowledge of databasing principles (no SQL or anything like that).

I’d like to have some kind of simple front-end for my database where the user selects a monitoring station of interest, variable type (e.g. stream nitrate concentration) and a time interval. The database would then return the requested data in csv format, which the user could download to their computer. In an ideal world the front-end would display a clickable map of all the monitoring stations, but if it’s easier then a drop-down list of available sites would be fine to begin with. I guess this front-end would probably be a website, but it doesn’t have to be.

How difficult is this, please, and what are my various options? I’m not a databasing expert by any means, but I do have a solid background in Desktop GIS and I’m happy writing simple Python scripts and playing with PostGIS, SpatiaLite and ESRI Personal geodatabases. I’ve never done any web development or web GIS, but I’m keen to learn.

I spent part of yesterday exploring some of the excellent OpenGeo tutorials. This approach looks promising, and at least I can now see how to get my data displayed on a website. What’s less obvious to me is how I let the user query the database and get results back.

My question: What kind of software structure should I be thinking about for a project like this? e.g.

PostGIS + GeoServer + Something else?

What other options are available that I should research?

A simple but functional solution would be preferred initially: if I can put together a basic prototype I can use it to justify spending more time learning how to do things “properly”. Open source is also a requirement as I don’t have any budget for this until I can prove some benefits.

Thanks very much!


texts: How to add a WFS layer to an OSM base layer from GeoServer

texts:
I'm sorry if I'm repeating what has been asked several times!

I'm a novice in OpenLayers and JavaScript, please can some one tell me where i am making a mistake, below is the code which I used to add my base map and the vector layer, I am using OpenLayers version 2.13.1, and I get the error:

ReferenceError: OpenLayers is not defined

with:

var WGS84 = new OpenLayers.Projection("EPSG:4326");

and with:

OpenLayers.Layer.OSM.Mapnik = OpenLayers.Class(OpenLayers.Layer.OSM, {

Please can someone help me out on this.

<!doctype html>

<meta charset="UTF-8">
<title>Document</title>


texts: Converting a Raster to Polygon and Dissolving Issues using ArcMap 10.5

texts:
I have a large forest habitat raster dataset (several watersheds in state of Oregon) that I need to convert into a shapefile. The raster has 70 different categories of habitat types.

Steps: I've converted the raster into a  a polygon using the "Raster to Polygon" tool and placed it in a GDB. The resulted feature class ended up with over 6 million records.  Next, I tried to dissolve the feature class based on the Habitat type, which should result with 70 records total (out of the 6m).

Problem: The dissolve tool seems to work, but its not including all the habitat types. It looks like it stops mid point and I end up with 30 habitat type vs. the 70 I should get.

Is this a simple issue of lack of memory? I am working with a powerful machine (64GB RAM).

During the conversion from raster to feature class, is there a way to avoid getting 6 million records and reducing that number somehow?


texts: Delete duplicate features with identic geometry based on attribute with QGIS

texts:
I have a vector layer containing landmark buildings in Stockholm. Each landmark building consists out of several features with the same KOM_ID but with different Z-values. When rasterizing this shape the building height (z-value) gets wrong due to the fact that multiple features with the same geometry overlap. For example the selected area below consists out of two features, one 61 and the other 37 meters above sea level. When rasterizing the z-value becomes 37, but only the value 61 is correct/relevant for me.

How can I "clean-up" this shape to get rid of duplicate overlapping features, keeping only the feature with the highest z-value (z-value marked with red circles below and named "hojd")

Download the shapefile here.


texts: SAR processing - geocoding shapefile which is slant range

texts:
Is there any software (like snap, sarscape etc.) can be used to geocode shapefile (slant range) to shapefile (ground range) (like WGS84)?

If yes, which data is need for that?

By the way, the shapefile is from Econgnition (not SAR related software).

"geocoding" means that I want to convert a shapefile which is in SAR coordinate system (called slant range) to the real world coordinate system (like WGS84) (called ground range).


texts: Change color of the spesific building from his labels

texts:
I just starting today to work with TileMill and I would change the color of a type of building, from his labels, that mean if I have building with (label=Hospital) that affects their a pink color. It is possibl an can someone help me please.

building-labels{
  [toponyme = 'Hôpital']{
    polygon-fill: pink * 1.2;
   }


texts: Error during building an application c++ using api qgis 2.8

texts:
I have an apllication that need an object

the object type is QgsSymbolV2

but i cannot do that :

QgsSymbolV2 * lSymbol = new QgsSymbolV2();

because in the class qgssymbolv2 there is no constructor it is a pure static class, but in the old version ( qgsi 1.6 by example ) the class qgissymbol has 3 types of constructor with different parameters and a default constructor

so my idea is to build my class CMyQgisSymbol by exemple in order to add some fonction that my application needs but my class must be instanciate by a new  and must be based or herit of the qgssymbolv2 class

i try this code :
in my header file :

class CMyQgsSymbol : public QgsSymbolV2
{
public :
    CMyQgsSymbol();
    ~CMyQgsSymbol();
}

in my source file :

lSymbol = new CMyQgsSymbol();

but when i build the code i have this error :

cannot allocate an object of abstract type

How can I proceed to create this object?


texts: Collapsing multiple lines into single line?

texts:
I need to create a route (line) feature class from another feature class that contains multiple lines making up the same route.

pic 1 shows the original feature class with the multiple lines.

pic 2 shows the 10 ft buffer I created around the lines. Preferably, the lines that fall within a buffer would become a single line (route).

I've been working on this for several days, and so far none of the tools/methods I've used have yielded the appropriate results.  I've tried dissolve, merge, and generalize.  I tried creating a center-line from the buffers; that also didn't yield good results.  Manual editing is out of the question as this is a network for the entire nation and it would take too long.

The best result so far I've gotten with a tool called Integrate. Even so, it's not completely accurate. (see pictures bellow)

before Integrate:

after Integrate:

As you can see, much better! Many of the lines have been collapsed into a single line. However, it's still not as accurate as I would hope.


texts: How to apply svg symbols as point markers in QGIS 2.0

texts:
I must be overlooking something obvious!

I've just downloaded and launched QGIS 2.0. I'm trying to edit a layer's symbol markers to use a more descriptive icon. Opening layer properties and then clicking the style tab, I only see a very limited collection of symbols. Clicking style manager too, I can't see any way to increase the symbols available.

Looking inside the application package, there is a folder resources which contains an svg folder full of the icons I'm looking for. How do I apply these as markers to a point layer?


texts: Finding sum of all pixels in raster using QGIS

texts:
I am trying to find the sum of all pixels in a raster, as shown below:

How do I do this using QGIS?


texts:
I am having an issue loading any ESRI personal geodatabase in QGIS 2.6. I have a number of files that worked in QGIS 2.4 and having done the upgrade I can't open them in 2.6.

I have tried this with installations based on the standalone installer and the OSGEO4W installer.

It affects geodatabases created in Arc 9.2, 9.3 and 10.0

Has anyone come across this issue? Am I missing something obvious?


texts: QGIS image export changes the map center and scale

texts:
I've been trying to export a few map layers using QGIS print composer. First, I loaded the layers and opened the composer using Project -> New Print Composer:

Gave it a proper name:

Added a new map:

Exported as image:

However, the outcome is shifted a few dozens of kilometers westwards:

This specific west shift is inconsistent; sometimes I experience a smaller shift or a shift in another direction. Moreover, the scale often changes too - which makes map exporting impossble.

I'm using the newest QGIS version:

Any idea how to export the image properly? I'm currently using screenshots, which are a poor solution.


texts: Prompting "parameter window" during execution of ArcGIS Python script tool (or model)?

texts:
I am pretty new to ArcGis and ArcPy, so I apologize if my question seems straightforward. However, I have been looking on the web for quite a while and didn't find any answer so far. I am using ArcGIS 10.2 for Desktop with Win7pro.
What I am trying to achieve is the following :

Run a script tool (or model) from the ArcGis window (that's easy)

This prompts the usual parameters window in which you fill all the needed fields (easy too)

At some point during the execution of the tool, I would like another tool to be executed (before the first tool stops its execution). When that's the case, I would like ArcGis to prompt a new window in which the user can enter the needed parameters for this tool.

My basic idea was to use only python code to prompt python GUI using TKinter during the execution of the script tool. I however understood that TKinter is not supported by ArcGis... Is that true  ? If yes, any other idea ?


texts: Leaflet Draw: edit/delete features of different layers

texts:
I use Leaflet Draw and Leaflet WFST plugins to create/edit features and save my edits to PostGIS Database (hosted by GeoServer). I have three layers: points, lines, and polygons. I manage to make new features be created and saved to each layer depending on geometry class.

However, Edit/Delete functions of L.Draw doesn't work with L.FeatureGroup() which contains multiple layers. They accept only one editable layer at a time.

Is there any way to make it work?

// Basemap
var map = new L.map('map').setView([57.704, 11.965], 6);
L.esri.basemapLayer('Topographic').addTo(map);

// Layers to draw in
var points = new L.WFST({
    url: 'http://localhost:8080/geoserver/ows',
    typeNS: 'postgis_test',
    typeName: 'points',
    crs: L.CRS.EPSG4326,
    geometryField: 'geom',
    });

var lines = new L.WFST({
    url: 'http://localhost:8080/geoserver/ows',
    typeNS: 'postgis_test',
    typeName: 'lines',
    crs: L.CRS.EPSG4326,
    geometryField: 'geom',
    });

var polygons = new L.WFST({
    url: 'http://localhost:8080/geoserver/ows',
    typeNS: 'postgis_test',
    typeName: 'polygons',
    crs: L.CRS.EPSG4326,
    geometryField: 'geom',
    });

var wfst = new L.featureGroup([points, lines, polygons]).addTo(map);

// Drawing
var drawControl = new L.Control.Draw({
    draw:{circle:false, circlemarker:false, rectangle:false, },
    edit:{featureGroup: wfst} });
map.addControl(drawControl);

map.on('draw:created', function (e) {
    var layer = e.layer,
        type = e.layerType;

    if (type === 'marker') {
        points.addLayer(layer);  }
    else if (type === 'polygon') {
        polygons.addLayer(layer); }
    else {
        lines.addLayer(layer); }
    });

map.on('draw:edited', function (e) {
    var layers = e.layers;
    layers.eachLayer( function (layer) {
        points.editLayer(layer); lines.editLayer(layer); polygons.editLayer(layer); });
    });

Here is en error message from console log:

TypeError: Cannot read property 'enable' of undefined
    at e._enableLayerEdit (leaflet.draw.js:9)
    at eachLayer (leaflet.js:5)
    at e.addHooks (leaflet.draw.js:9)
    at enable (leaflet.js:5)
    at enable (leaflet.draw.js:9)
    at HTMLAnchorElement.r (leaflet.js:5)


texts:
I'm trying to install Spatialite (4.3.0a) on Ubuntu (14.94.2 LTS) ..... I'd like to use it with PHP (5.5.9-1) ....

Following this post

https://faimsproject.atlassian.net/wiki/display/FAIMS/Installing+Spatialite+4+on+Ubuntu

(obviously using the updated versions of the packages involved....), I've now installed:

PHP 5.5.9-1
SQLite 3.9.2
Proj4 4.9.2
Geos 3.5.0
Freexl 1.0.2
Spatialite 4.3.0a

I've also exported /usr/local/lib

export "LD_LIBRARY_PATH=/usr/local/lib"

It seems that SQLITE 3 and Spatialite are working fine ...

sqlite3 myDB
SQLite version 3.9.2 2015-11-02 18:31:45
Enter ".help" for usage hints.
sqlite> SELECT load_extension('mod_spatialite');

sqlite> SELECT sqlite_version();
3.9.2
sqlite> SELECT spatialite_version();
4.3.0a
sqlite> SELECT proj4_version();
Rel. 4.9.2, 08 September 2015
sqlite> SELECT geos_version();
3.5.0-CAPI-1.9.0 r4084
sqlite> .quit

But if I try to execute this simple PHP file

    <title>Testing SpatiaLite on PHP</title>

testing SpatiaLite on PHP

<?php
# connecting some SQLite DB
# we'll actually use an IN-MEMORY DB
# so to avoid any further complexity;
# an IN-MEMORY DB simply is a temp-DB
$db = new SQLite3(':memory:');

# loading SpatiaLite as an extension
$db->loadExtension('/usr/local/lib/mod_spatialite.so');

# enabling Spatial Metadata
# using v.2.4.0 this automatically initializes SPATIAL_REF_SYS
# and GEOMETRY_COLUMNS
$db->exec("SELECT InitSpatialMetadata()");

# reporting some version info
$rs = $db->query('SELECT sqlite_version()');
while ($row = $rs->fetchArray())
{
  print "
SQLite version: $row[0]
";
}
$rs = $db->query('SELECT spatialite_version()');
while ($row = $rs->fetchArray())
{
  print "
SpatiaLite version: $row[0]
";
}

?>

... the result is

testing SpatiaLite on PHP

SQLite version: 3.9.2

so it seems that somthing is going wrong with loading Spatialite.

My php.ini configuration is the follow

[sqlite]
 http://php.net/sqlite.assoc-case
sqlite.assoc_case = 0

[sqlite3]
sqlite3.extension_dir = /var/www/html/test/sqlite3_ext

In /var/www/html/test/sqlite3_ext there are

-rwxr-xr-x 1 cesare cesare 15527574 Dec  1 22:17 libspatialite.so
-rwxr-xr-x 1 cesare cesare 15944537 Dec  2 22:28 mod_spatialite.so


texts: Here is a complete beginner´s question, maybe someone has time to help: I just downloaded the Corine land cover sqlite file, the whole database has 5.5 GB and takes forever to open. How can I save a geographically defined subset (one country) only, in a new database probably, so that I can actually work with it?


texts: ArcMap Desktop crashes when using geoprocessing tool with PostgreSQL layers?

texts:
Whenever I use a geoprocessing tool (Clip tool) with a PostgreSQL/PostGIS table, the program crashes. If I make the process run in background, the process fails without any specific error message.

The input feature is a table located in the schema 'data' This is a very large table (~ 40 000 rows). The clip feature is a materialized view also from the schema 'data', but with a 'Definition Query' (ArcMap) applied to it so it returns only one polygon.

I looked at the PostgreSQL logs and everytime I use a geoprocessing tool, there is this error:

2017-02-08 22:43:13 EST LOG:  Could not reveive data from client : unrecognized winsock error 10054

The output location is in a scratch file geodatabase on the local computer.

The database connection is working fine. The permissions to write to PostgreSQL are OK (I connect with user 'postgres', which has superuser privilege).

If I run the equivalent process in QGIS (for exemple, Clip) with the exact same tables, everything works perfectly.

Software used:

Server-side:

PostgreSQL 9.4.10 (64 bits)
PostGIS 2.2.3
Windows Server 2012 R2

Client-side:

ArcMap 10.4
Windows 10 (64 bits)
PostgreSQL ODBC Driver version 9.05 (32 bits)


texts: What method does QGIS Merge Rasters tool use?

texts:
I am trying to merge rasters in QGIS and want to set a priority order for merging so that the values from the highest priority raster are used in overlap areas (the “FIRST” merge/mosaic method, I believe).

Does anyone know what the merge method is for the QGIS tool under Vector -> Miscellaneous -> Merge?  I have not found documentation for the method, but it is clear that it is combining the files in some way other than just taking values from the first loaded raster.

Is the SAGA Mosaic Raster Layers my best alternative?


texts: Sequentially number attribute field as the table is currently ordered in QGIS?

texts:
At QGIS 3.8.2, I need to populate a field (let's call it field_a) in a sequentially increasing (1, 2, 3,...) order.  However, I need the sequence to increase in the order that the table is currently sorted (let's say that it is currently sorted by field_b).

I tried @row_number, but the increasing sequence does not follow the current sort order.  I think it follows an internal id, but I'm not sure...


texts:
In the of the European INSPIRE directive the following "common principles" are presented:

 1. Data should be collected only once and kept where it can be
    maintained most effectively.
 2. It should be possible to combine seamless spatial information from
   different sources across Europe and share it with many users and
   applications.
 3. It should be possible for information collected at one level/scale to
   be shared with all levels/scales; detailed for thorough
   investigations, general for strategic purposes.
 4. Geographic information needed for good governance at all levels
   should be readily and transparently available.
 5. Easy to find what geographic information is available, how it can be
   used to meet a particular need, and under which conditions it can be
   acquired and used.*

In principle 2 the term "seamless spatial information" is mentioned. Outside references to the above I fail to find good references.

The closest I can get to have this term explained is an old USGS paper discussing "seamless, scaleless cartographic data bases". Their description is as follows:

A seamless data base implies an ability to query, display, retrieve, or otherwise traverse the contents of a large spatial data base without limitations imposed by the spatial extent of the data. For example, a command to display the Mississippi River would yield the entire river, not just a portion of it. A scaleless data base implies an ability to transition from one level of detail to another appropriate to the scale of the display or precision of the data analysis.

I have also found a reference here on gis.stackexchange.com which answers the question on what a "seamless table" is. But that question does not represent a duplicate of this question.

So the question remains - what does seamless spatial information mean in the context of the INSPIRE directive? Or is it simply a consequence of poor use of language where they actually meant to write "[..]possible to seamlessly combine spatial information"?


texts:
I am trying to put two different maps on one sheet, one of them should show the raster image of a survey, the other one the vector-rendering of anomalies of the same area, but without the raster image.

This worked in the editor by just not updating one of the mapframes, but when I save the plan as an image QGIS automatically updates both frames, so they both show the same image.

Does anyone know, how to avoid this?

I am using QGIS 2.8.1


texts: How to create GeoTiff file from .h5 file?

texts:
I have .h5 file containing Latitude, Longitude and Dataset(I m working multiple type of dataset).And I want GeoTiff file of it contains all Information related to GeoTiff. So is there any way to create GeoTiff from .h5 file?
Or is that ok to create Tiff image from .h5 and create GeoTiff image from it?


texts: Python QGIS 2.18 to QGIS 3 : Shp file attribute joins and how do i specify the join fields?

texts:
My question is in two parts :

1) How do I modify my pre-existing QGIS 2.18 script to work in QGIS 3? (i'm still learning Python)

2) How do I modify it to join only specific fields (i.e. i dont want to join all 20+ columns)

The script I used in  QGIS 2.18 to create joins between a shp file and csv.

import processing
    shpField='nd_id'
    csvField='pt_nd_id'
    result = processing.runandload('qgis:joinattributestable', shp, csv, shpField, csvField, None)

However this script doesn't work in QGIS 3 due to changes in processing.runandload which is now processing.runAndLoadResults and as far as I can tell there might be some changes to joinattributestable(?)

i've already looked at QGIS 3 - Python : QgsVectorLayerJoinInfo issue and this Performing specific table joins in QGIS via python? and based on these i've cooked up the following : (NB: I'm trying to join between 2 shpfiles here)

QgsProject().instance().mapLayersByName('t_alpha')[0]
QgsProject().instance().mapLayersByName('t_beta')[0]

lien = QgsVectorLayerJoinInfo()
lien.setJoinFieldName('ID_alpha')
lien.setTargetFieldName('ID_beta')
lien.setJoinLayerId(layerToJoin.id())
lien.setUsingMemoryCache(True)
lien.setJoinLayer(layerToJoin)
target.addJoin(lien)

But this codes returns

  ...IndexError: list index out of range

Any advice/ clues?


texts:
I have a strange berhaviour in this postGIS query:

SELECT
st_length(st_linemerge(v.geom)),
c.prog_ini,
c.prog_fin,
c.prog_ini/st_length(st_linemerge(v.geom)) as ini,
c.prog_fin/st_length(st_linemerge(v.geom))as fin
,
ST_Line_Substring (
st_linemerge(v.geom),
0.00505368,
--(c.prog_ini/st_length(st_linemerge(v.geom))) ,
--(c.prog_fin/st_length(st_linemerge(v.geom)))
0.98862698327
)
FROM geometrie.route v, geometrie.test_editing_banchine c
WHERE c.id=(SELECT id FROM geometrie.test_editing_banchine ORDER BY id desc limit 1)
order by
st_distance(
v.geom,
(select geom from geometrie.test_editing_banchine order by id desc limit 1)
)
limit 1

c.prog_ini ~ 16

c.prog_fin ~ 3130

st_length(st_linemerge(v.geom)) ~ 3166

-->

c.prog_ini/st_length(st_linemerge(v.geom)) = 0.00505368

and

c.prog_fin/st_length(st_linemerge(v.geom)) = 0.98862698327

Nevertheless if I use c.prog_fin/st_length(st_linemerge(v.geom)) in the ST_Line_Substring function it give me this strange error : line_interpolate_point: 3rd arg isn't within [0,1] strange behavour

The following code using a multiline extracted from database as WKT run, but I do not understand why. I have extracted data from PostGIS and saved as geopackage file

DROP TABLE route_test;

CREATE TABLE route_test (
    gid integer NOT NULL,
    geom geometry(MultiLineStringZ,25832),
    CONSTRAINT route_pkey PRIMARY KEY (gid) );

INSERT INTO route_test(     gid,  geom)     VALUES ( 1 , st_geomfromtext(' MULTILINESTRINGZ ((552870.079182017 4975608.0872109 0,552863.928878817
4975605.22438149 0,552858.4079636 4975603.01583816 0,552857.656937005 4975602.715425 0,552849.650736397 4975604.02613298 0,552840.64907789 4975606.59785298 0,552831.614026171 4975608.02451834 0,552828.432932115 4975608.52668306 0,552819.398683959
4975611.49597686 0,552788.666634788 4975615.25887112 0,552756.473805761 4975620.62236648 0,552678.339864291
4975633.63992574 0,552557.373880618 4975653.54486617 0,552525.218462427 4975658.64878726 0,552327.622462795
4975690.42472925 0,552227.108015194 4975718.78024926 0,552105.383953447 4975764.42584021 0,551949.540417632
4975820.44538071 0,551885.911822372 4975842.57668511 0,551809.379121691 4975870.15340717 0,551806.759177161
4975871.09697318 0,551803.379237542 4975872.31512546 0,551701.020527821 4975894.4461884 0,551576.99073443 4975915.88529909 0,551491.081111876 4975933.21036542 0,551456.082581007
4975946.42067222 0,551392.954650983 4975981.23030989 0,551359.792727037 4975999.77810068 0,551353.331676582 4976003.3919956 0,551249.90914644 4976060.36314126 0,551145.143687712 4976119.34901554 0,551053.137737444 4976172.29073488 0,551020.421585494
4976188.27273662 0,550955.75965049 4976219.85992434 0,550865.09689163 4976266.08617302 0,550858.129804193 4976269.48846335 0,550780.814485796 4976307.24439802 0,550624.500956325 4976384.7435956 0,550605.785135294 4976394.02270788 0,550553.242764374
4976420.07262972 0,550530.895177457 4976431.15228196 0,550484.691467709 4976450.40361963 0,550224.271294783
4976534.40852089 0,550104.561932027 4976580.96124509 0,550062.013950878 4976595.37250615 0,550021.310661589
4976609.15860862 0,549992.363990882 4976618.96304992 0,549974.351749695 4976625.06383419 0,549945.370657045
4976635.22605682 0,549908.481140796 4976648.16112703 0))     ', 25832)  );

SELECT  1 as id,
--c.prog_ini,
--c.prog_fin,
16,
 3130,
st_length(st_linemerge(v.geom)),
16/st_length(st_linemerge(v.geom))::float as ini,
3130/st_length(st_linemerge(v.geom))::float as fin,
ST_Line_Substring (  st_linemerge(v.geom),
16/st_length(st_linemerge(v.geom))::float,
3160/st_length(st_linemerge(v.geom))::float
) as geom
FROM  route_test v;


texts:
How do you completely turn a shapefile (created with QGIS, including .shx and the other 4-5 files) into one tabular dataset.

I am actually doing this when I import the shapefile into Postgresql database, but I was wondering if there is the opportunity to do that in another way.


texts: Selecting a very Large Number of Column Rows based on a comma separated list of numbers

texts:
I have managed to do a lot of work regarding point data in the wrong projection, I forgot to change CRS from user 1000005 to BNG before I saved the layer as BNG so now it thinks it is in BNG only it is in the wrong location by a few meters.

I have managed to give each point which is the same, only in the wrong location, the same unique ID number and have the list of numbers (14,000+) saved as a text file with each ID being separated by a comma.

Is there a way i can use this list of ID's to select the relevant ID from the newly corrected point data set?

I have tried using select by attribute and expression but it does not like the comma separating the values and will only search for one value for me at a time.

I think if  '' was added to each number and an OR operator was placed in between each of them this would work in 'select by attribute' but unfortunately I am not aware of how to do this.

I am using QGIS 2.18 on windows 10


texts: Leaflet Search: cannot search for Point types

texts:
I followed this repository Leaflet Search

and I want to combine search box, using polygons, polylines, and point.
for polygons and polylines is working fine. But not for points. The property Name does appear but, when I select it there is no response..

as you can see i got error when i find point

and if i find anothers likes Polylines or polygons,

var map = new L.Map('map', {zoom: 1, center: new L.latLng([37.8, -96]) });

    map.addLayer(new L.TileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png')); //base layer

    var us_states = new L.GeoJSON(us_states, {
        style: function(feature) {
            return {color: feature.properties.color };
        },
        onEachFeature: function(feature, marker) {
            marker.bindPopup('
'+ feature.properties.name +'
');
        }
    });

    map.addLayer(us_states);

    var restaurant = new L.GeoJSON(restaurant, {
        style: function(feature) {
            return {color: feature.properties.color };
        },
        onEachFeature: function(feature, marker) {
            marker.bindPopup('
'+ feature.properties.name +'
');
        }
    });

    map.addLayer(restaurant);

    var searchControl = new L.Control.Search({
        layer: L.featureGroup([us_states,restaurant]),
        propertyName: 'name',
        marker: false,
        moveToLocation: function(latlng, title, map) {
            var zoom = map.getBoundsZoom(latlng.layer.getBounds());
            map.setView(latlng, zoom);
        }
    });

    searchControl.on('search:locationfound', function(e) {
        e.layer.setStyle({fillColor: '#3f0', color: '#0f0'});
        if(e.layer._popup)
            e.layer.openPopup();

    }).on('search:collapsed', function(e) {

        featuresLayer.eachLayer(function(layer) {
            featuresLayer.resetStyle(layer);
        });
    });

    map.addControl( searchControl );

maybe someone can help me?

this error notice :

  Uncaught TypeError: latlng.layer.getBounds is not a function
      at e.moveToLocation [as _moveToLocation] (geojson-layer.html:63)
      at e.showLocation (leaflet-search.js:893)
      at e._handleSubmit (leaflet-search.js:856)
      at e. (leaflet-search.js:398)
      at HTMLLIElement.r (leaflet.js:5)


texts: What is the geometry type if I am having mixed geometry?

texts: I have a mixed geometry data some belong to MULTIPOLYGON and others belong to MULTIPOLYGONZM and I want to insert the data into one.


texts:
I'm trying to find a way to add API layers from this HTML code into the MXD file of ArcGIS Desktop 10.3. The HTML file located in my pc:  G:\desktop\y\html

Is it possible?


texts:
I'm trying to create a flow map using FlowMapGenerator. My map is trying to visually show the movement of professional soccer referees to various venues throughout the season. I plan to have several maps, one for each referee. I have a shapefile of points of each referee's home town that also contains information about each of them. I also have a shapefile of points of each team's location that also contains information about each team.

For the first map, the referee lives in New Jersey. I exported his information from the referee shapefile as an independent shapefile to use as the source point. I then added a new attribute to the team data containing the number of times he visited each venue this season to use as a Z-Value. I then exported the information of only the venues he had visited as a new independent shapefile to use as the destination points so that no venue would have a Z-Value of 0.

When I run the toolbox to create the flowmap, I get the following error:

Does anyone have any idea what I might need to fix to get the flowmap to generate?


texts:
I am trying to import a mid/mif into MapInfo. I follow the usual routine of Table --> Import and select the correct mid/mif.

I get the following error:

(f:\FILENAME.mif:8) Found [(] while searching for [An identifier]

I have searched online and found no mention of this error. Any help?


texts: Transforming a GeoPackage table's geometry column into GeoJSON?

texts:
I have a GeoPackage that is downloaded to client devices for a mobile app. I need the clients to query the GeoPackage to retrieve a GeoJSON representation of the geom column. I'm familiar with ST_AsGeoJSON(geom) available in PostGIS, but I cannot find a similar solution using a GeoPackage.

How can I transform the geom column into GeoJSON? Ideally it would be in a query, but if that's not available I'd like to know how to convert the geom binary myself programmatically.


texts: Making QGIS interpret coordinates as long-lat instead of lat-long?

texts:
I am working with the TRMM 3B31 files on precipitation provided by NASA. When I load them on QGIS selecting the WGS84 projection together with other shape files the maps are displayed vertically, i.e. QGIS interpret as latitude what instead is longitude and vice-versa. I have tried gdal_translate option -a_ullr selecting imposing good coordinates but it doesn't solve the problem: the images are only compressed and stretched to satisfy my requirements but this is clearly not what I would like to have.

When you load a .csv file you can choose what has to be the latitude and what the longitude, is there a way to do the same for rasters?

Since I have 193 raster it would be great if you can suggest a command that can be performed iteratively.

The image shows a map of India and the first band of the 3B31 file, i.e. surface precipitation. The two black lines are the 40 and -40 parallel. I would like to have them horizontal and hence that the rain data overlaps with India.


texts: Labels shifting to different locations after I save from the attribute table

texts:
I just started working with QGIS, and I'm having a problem with my labels. I have figured out how to manually move labels for the points on my map.

I have edited the attribute table to include x, y, and rotation with the decimal number option.

I can move labels around freely (which is absolutely necessary because my points are quite close together).

The problem occurs when I save the attribute table. As soon as I save, the labels start shifting. I figured that my numbers had been truncated, which turned out to be the case, so I gave the x, y, and rotation fields the max length possible (20) to remedy the situation. It helped some, but my labels continue to snap to different locations. As soon as I hit save, the labels move, but the coordinates stay the same.

Can anyone help?


texts: Send query to ArcGIS REST from OpenLayers app

texts:
I am using OpenLayers application and sending WMS query to my geoserver. My polygon is sending to server and gets intersected features.

var feature = Mypolygon;

 var filter = new OpenLayers.Filter.Spatial({
     type: OpenLayers.Filter.Spatial.INTERSECTS,
     value: feature.geometry
 });

var protocol = new OpenLayers.Protocol.WFS({
    version: "1.1.0",
    url:  "http://mydomain/geoserver/wfs",
    featureType: "my_points",
    featureNS: "http://www.openplans.org",
    geometryName: "the_geom"
});

wfsProtocol.read({
    filter: filter,
    callback: function (e) {}
})

This way is working to query geoserver WFS service. But I need to send query to a ArcGIS rest service. Mypolygon will be sent to ArcGIS service and get intersected polygons.

http://mapservices/arcgis/rest/services/Mypoints/MapServer/0

I can use ajax call to Arcgis Rest,  but how can I send Mypolygon as a parameter?
is this possible?


texts: Converting Avenue scripts/extensions from ArcView 3.x to ArcPy for ArcGIS Desktop?

texts: As a side project, I'm looking into the effort required to (semi-) automate conversion from Avenue to Python, instead of keeping ArcView 3.x around to run them.


texts: Displaying combined data values in ArcMap

texts:
I've got some data in an attributes table and I would like to know how I can combine them in order to get an unique value in the map.

For instance,

Attribute: Type
Value: Street

Those values I want to represent in the following format: Type / Street


texts: How do I get a specific scale/zoom level in the QGIS canvas?

texts:
I have a map project with CRS = NAD83 zone 13N. The canvas will zoom to 1:144,447, 1:288,295, 1:577,790, etc. The values in the dropdown, on the other hand are 1:100,000, 1:250,000, 1:500,000, etc. Why is it zooming to these odd values and how do I coerce it to zoom to the levels in the dropdown or typed into the scale box?

QGIS 2.12.1 - Lyon
Win 7 Pro 64 bit


texts: Why is the BING basemap in ArcView different from the one on http://www.bing.com/maps/

texts:
The quality of the original Bing imagery on the Bing Website is much higher. How can I get it into ArcMap? I read, that the ArcMap imagery BaseLayer is based on Bing service!

South of Ouagadougou (Burkina Faso):

ArcMap Basemap:

Same region on Bing Website:


texts: OSM roads polygonized in PostGIS = nonsense

texts:
I have a dump of OSM data in my city and wrote a query to polygonize it. In the first attempt, the result looked like this:

The problem was that OSM lines were not split and I guessed that the polygonizer only made polygons of entire linestrings:

^^ here, the green nodes are used for polygons, the blue ones are ignored, together with line 3.

Since st_split supports slice by multiple points only in PostGIS 2.2, I decided to write a Python script to do this. Together with some SQL code, it splits lines into segments that respect intersections. Every road joining an intersection is unique.

The way I understand it now:

The SQL code:

CREATE VIEW nodes AS
SELECT ROW_NUMBER() OVER () id, st_node(way) nd
FROM rd_sliced_roads;

DROP VIEW IF EXISTS pg;
CREATE VIEW pg AS
WITH
    polygroup AS (SELECT ST_Polygonize(way) initial FROM nodes),
    dumped AS (SELECT (st_dump(initial)).geom result FROM polygroup)
SELECT ROW_NUMBER() OVER () id, result
FROM dumped;

The result is still quite similar: polygons are ignored, even though lines join each other. Red lines are both source and st_nodified lines. Why does st_polygonize ignore these small quarters?

What am I missing here?


texts: How to use a parameter to change a default value

texts:
I'm learning model builder and creating a Transportation model

I'm reading from a truck table with a cost field. This field has already a value on database and I can change to a default value (lets say Cx) using field mapping and everything go very good, the rest of results use the default value Cx to calculate cost.

I also can make the table truck be requested as a parameter and it also works ok.

But I want to run some simulations so I want the default value Cx be requested as parameter as well. Right now I have to enter on the field mapping on the model every time I want to change.

What tool should I use to make the default value on the "field mapping" also a parameter?


texts: Pyshp draws polygons out of order after intersection of two shapefiles

texts:
I have two shapefiles. One contains electoral borders but not coastline and the other contains provinces and coastlines. I am plotting the electoral districts using Python's pyshp and filling in the colors according to some data. That all works on the original shapefile:

And here is the important part of my plotting script:

sf = shp.Reader(shapefile)
records = []
shapes = []
for i,j in zip(sf.records(),sf.shapeRecords()):
    records.append(i)
    shapes.append(j)

plt.figure()
for rec,shape in zip(records,shapes):
    xy = [[i[0],i[1]] for i in shape.shape.points]
    plt.fill([i[0] for i in xy], [i[1] for i in xy], lw=0.2, edgecolor='white', facecolor=cmap(<some numbers from a list>))

I wanted the electoral districts to have nicer looking borders on the coasts so I used the intersect feature in QGIS to create a new shapefile of the electoral district file as an input layer and the coastline file as the intersecting layer. The result of that displays just fine in QGIS:

Here are the original shapefiles that I intersected shown overlapping in QGIS:

As you can hopefully see from the screen grab, some electoral districts get broken into multiple polygons because they contain islands, for example, but maintain their attributes (which is what I want).

However, when I use the same Python script above it seems that the plotting order of the points is all messed up resulting in oddly shaped polygons. It looks like the drawing is jumping across points previously part of the same electoral district and the same polygon but now apart of different polygons but still the same district.

Can anyone help? I can provide more details upon request.

EDIT:

I've narrowed the problem down to the way I'm handling multipart polygons. The intersection didn't break up polygons into new polygons, it just created multiple parts for each one and I'm not sure how to use pyshp to draw the parts separately.


texts: I've been trying to do the very intro CartoDB Map Academy course, but when I try to load the example files – e.g., http://acdmy.org/d/counties.zip – I get a screen that says "Downloading file" forever and eventually it just fails and I later get an email telling me that it couldn't import my table, without any more details. Any idea what's going on here?


texts: Difference in EPSG:28992 (RD/Amersfoort) definitions

texts:
I need to do some projections between WGS84 (EPSG:4326) and the Dutch RD system (EPSG:28992) in JavaScript.

I use Proj4js for this. When adding the definition from spatialreference.org I noticed a difference with the definition that is embedded in my PostGIS database:

// Source: PostGIS SRID 28992 from database
"+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +towgs84=565.417,50.3319,465.552,-0.398957,0.343988,-1.8774,4.0725 +units=m +no_defs"

// Source: http://spatialreference.org/ref/epsg/amersfoort-rd-new/proj4js/
"+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +units=m +no_defs"

The difference being +towgs84=565.417,50.3319,465.552,-0.398957,0.343988,-1.8774,4.0725 that is present in the PostGIS definition but not in the spatialreference.org definition.

Is this a meaningful difference? If so, what does this part of the string define?


texts: Is there geocoding "undo" button in CartoDB?

texts:
Here's the map in question: https://mwhite.cartodb.com/tables/where_good_neighbors_work

Our map had been working beautifully for several months, but when updates were attempted recently, all of our locations were somehow changed to the same longitude/latitude point. Basically, I want to know if we need to go in and fix all of them by hand (I cannot get geocoding to work anymore using any of my table's location criteria, though it worked fine before. I strongly suspect using geocoding might have caused this problem in the first place, but I can't say for sure as I was not the one who used it this time).

Anyway. If there is some way of automating the long/lat fix, or possibly using a proverbial “back button” to restore the geodata we had before, I would like to try those options before going through the labor-intensive process of correcting them all by hand.


texts: How to show only postgres vector layers in a QgsMapLayerComboBox?

texts:
I started to develop a plugin for QGIS in python and I need to list postgres layers in a QgsMapLayerComboBox. I used a QgsMapLayerProxyModel to show only vector layers from canvas:

self.dlg.comboBox.setCurrentIndex(-1)
self.dlg.comboBox.setFilters(QgsMapLayerProxyModel.VectorLayer)

It's possible to show only vector layers from a postgres connection?

SOLVED:

def updateMapLayerComboBox(self):
        excepted = self.dlg.comboBox.exceptedLayerList()
        mapLayers = QgsMapLayerRegistry.instance().mapLayers().values()
        for layer in mapLayers:
            if hasattr(layer, 'providerType') and layer.providerType() != 'postgres':
                excepted.append( layer )
        self.dlg.comboBox.setExceptedLayerList( excepted )

QgsMapLayerRegistry.instance().layersAdded.connect(self.updateMapLayerComboBox)
QgsMapLayerRegistry.instance().layersRemoved.connect(self.updateMapLayerComboBox)


texts: I want run the sen2cor process, with the L2A_Process executable, for transform the Sentinel-2 L1C product in L2A but I need this on the earth engine platform. I'm using the Earth Engine Python API on Datalab but I don't understand how I can run the sen2cor executable on this platform.


texts:
An arcpy merge process is failing due to the size of the datasets and I need to just merge every 100 tiles before it goes on to the next 100 tiles.

I wrote the following snippet but it is just putting the same tif into the list. It's probably something simple that I am doing wrong but would appreciate your advice....

arcpy.env.workspace=root+"\\Stage1\\"+name+"\\GeoTif"
tifList=arcpy.ListRasters('*.tif')
tifListCount=len(tifList)

tempTifList=[]
x=0
oldx=0
while x <= tifListCount:
    for tif in tifList:
        while x<(oldx+100):
            tempTifList.append(tif)
            x=x+1

        print "List "+str(oldx)+" is"+ str(tempTifList)
        # Add merge process on tempTifList
        tempTifList=[]
        oldx=x

Gives

  , u'PFTI_Roads2_Z31.tif', u'PFTI_Roads2_Z31.tif',
  u'PFTI_Roads2_Z31.tif', u'PFTI_Roads2_Z31.tif',
  u'PFTI_Roads2_Z31.tif', u'PFTI_Roads2_Z31.tif',
  u'PFTI_Roads2_Z31.tif', u'PFTI_Roads2_Z31.tif',
  u'PFTI_Roads2_Z31.tif', u'PFTI_Roads2_Z31.tif']
  List 75900
  is[u'PFTI_Roads2_Z32.tif', u'PFTI_Roads2_Z32.tif',
  u'PFTI_Roads2_Z32.tif', u'PFTI_Roads2_Z32.tif',
  u'PFTI_Roads2_Z32.tif', u'PFTI_Roads2_Z32.tif',
  u'PFTI_Roads2_Z32.tif', u'PFTI_Roads2_Z32.tif',
  u'PFTI_Roads2_Z32.tif', u'PFTI_Roads2_Z32.tif


texts: I cannot find any api to rotate a feature / geometry in openlayers 3. How do I rotate a polygon in openlayers 3?


texts: Migrating from Visual Studio 2008 (ArcGIS 10) to Visual Studio 2010

texts:
I've migrated my add-in project from VS 2008 to VS 2010 recently, and am now receiving the following error:

Unable to cast COM object of type 'System.__ComObject' to interface type 'ESRI.ArcGIS.Carto.IFeatureLayer.....
... No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

I've aready gone through and removed/refreshed the references to my testing framework (I had to move Rhino Mocks when I upgraded).  I am curious, has anyone seen this, and which obscure setting have I not captured and repaired -- I've already gone through the x64/x86 switches?


texts: Integrating NTv2-transformation in QGIS?

texts:
I am wondering what's the correct way to integrate a NTv2-transformation in QGIS.

I have successfully integrated a NTv2-transformation in QGIS but I am not sure if it's done the way it's meant to be.

For integrating NTV2-grids in QGIS I found several information that the name of the grid should be stored in the p1 column of the table tbl_datum_transform of the srs.db:

https://github.com/qgis/QGIS/pull/1502#issuecomment-50580199

https://dragons8mycat.com/2014/03/03/gis-tips-getting-ostn02-to-work-with-qgis-2-2/

https://web.archive.org/web/20140224182157/http://sourcepole.ch/ntv2-transformations-with-qgis

http://isticktoit.net/?p=371

(Screenshot of http://www.gkg-kassel.de/pdf/Praezise_Transformation_im_QGIS_mit_Batchmodus.pdf (german) )

What makes me doubt if that's correct is the fact that the column seems to  have a numeric field type:

Isn't the first parameter of a seven-parameter transformation stored in the p1 column of QGIS's tbl_datum_transform table?

According to the sqlite FAQ it's possible to store a string into a numeric column in sqlite ( https://sqlite.org/faq.html#q3 ) but it seems to me like a hack or workaround to store a string into a numeric column.
Is this really the way it's meant to be done?

tl;dr: What's the correct way to integrate a NTv2-transformation in QGIS?


texts: What is the difference between Geoprocessing Map object vs. MapDocument object in Python

texts:
I have the following code:

mxd["C1"] = arcpy.mapping.MapDocument(os.path.join(fRoot, filename))
mxd["C2"] = [arcpy.mapping.MapDocument(os.path.join(fRoot, filename))]

C1 creates a geoprocessing Map object

C2 creates a MapDocument object

What is the difference between them in terms of functionality and/or limitations?

http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00s30000000n000000

UPDATE: Still not really sure what the difference is but found out in order to run my program I required to have geoprocessing Map objects and not MapDocument objects.

Things like mxd.save(), and assigning the dataframe only seem to work with the geoprocessing object.


texts: Splitting line and determining unique output using ArcGIS Pro?

texts:
I am using ArcGIS Pro on a water main system.

I have water mains and water main valves and I am trying to split the main at the valves.

The problem I am having is which attribute becomes the unique value. 2 of the attributes I have on the water main feature is objectID and Cartegraph ID. When I split the main at the valve I want the unique values to be on the Cartegraph ID, but it is making it the ObjectID. So for example if I am splitting the water main with cartegraph ID 1, I want the two mains to have cartegraph ID 1 and 2 as the final output.  However, it is applying the unique value to the Object ID attribute, giving that attribute the unique values of 1 and 2.

How do I get it to assign the new value to cartegraph ID rather than object ID?


texts: Has API been written for SpatiaLite for Cordova?

texts:
I am creating an app in which I will be creating an AutoCAD model for a 3 floor building at my college.

I'll be importing this model as a spatial object into my javascript app - then wrap it with cordova/ionic and use it on iphone.

I want the user to be able to tap starting and ending points on my map object (not geospatial, just an object) and the shortest path to get there will be highlighted.

I have got SQlite working on the javascript / cordova app.

An API was written for SQLite for cordova.

Is there one for Spatialite as well?


texts: How to check two 3D Geometry are equal in PostGIS?


texts: Undefined values of nitrogen dioxide in time series chart (GEE)

texts:
I am not able to see the values for NO2 in the time series. In the figure, tropspheric_No2_coloumn_density displays the value zero.
How to display the correct value?

var geom Table users/shapefile
var collection = ee.ImageCollection('COPERNICUS/S5P/NRTI/L3_NO2')
  .select('tropospheric_NO2_column_number_density')
  .filterBounds(geom)
  .filterDate('2019-03-01', '2019-08-31');

function tabulate(i){
  return geom.map(function (f){
    var r = i.reduceRegion({
      reducer: ee.Reducer.mean(),
      geometry: f.geometry(),
      scale: 3,
      bestEffort:true,
      maxPixels:1e9});
return ee.Feature(null, {
  name: f.get('OBJECTID'),
  index: i.get('system:time_start'),
}).setMulti(r);
  });}

var resultstable = collection.map(tabulate).flatten();

print(ui.Chart.image.series(collection, geom));


texts: ArcGIS geoprocessing Metadata Translator error

texts:
We're using the ArcGIS Metadata Translator tool within ArcObjects.net using geoprocessing, which for the most part is working fine, but it's throwing us this error occasionally:

  The process cannot access the file 'C:\Documents and
  Settings\\Local Settings\Temp\translator_source.xml' because
  it is being used by another process. Failed to execute
  (ESRITranslator).

The only reference I could find to this file is in a list of resolved issues for a Arc 9.3.1 update, which reads:

  NIM036270 - Every other time you run the USGS MP Metadata Translator
  with anything except XML files, the tool will fail with the error "The
  process cannot access the file 'C:\Documents and Settings\aleta\Local
  Settings\Temp\translator_source.xml' because it is being used by
  another process."

We are running ArcGIS 10 and our process is just running on feature classes and tables and exporting metadata to XML.
The only thing I can think of that might be causing this is that it's likely that our server may be running more than one metadata update process at the same time, so multiple processes may be using this geoprocessing tool at the same time, but should that cause this issue? I assume ArcGIS handles multiple requests for a tool appropriately, but I could be wrong. Does anyone know?

Has anyone come across a similar issue before? Does anyone know if this temporary location used by the tool can be changed?


texts: How to combine carbon sequestration rate with tree cover data?

texts:
My aim is to create a model that calculates the carbon sequestration for a selected forest type, for a range of time periods (5, 10, 15, 20 yrs) within a user defined study area within mainland Britain. So far I have a raster layer with the land cover % for Britain (MODIS fractional tree cover) and a excel spreadsheet with the cumulative and yearly carbon sequestration rates for 17 tree species over the given time intervals.

How do I combine the sequestration rate with the tree cover data? Is there a specific tool that would help me? Also, no iterations need to be used.


texts:
I have three to four layers (shapefile data) in GeoServer, and I have to have all of them to make a map of a city.  However, so far I can only create a map with only one layer by writing

map = new OpenLayers.Map('map');
var build_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
                "http://localhost:8090/geoserver/wms/wsNYCRoad", {layers: 'building'}

If I add more layers by writing

var population_wms=...
var road_wms =...
map.addLayers([build_wms,population_wms,road_wms]);

then I can choose only one of these layers (in layer switcher) to be displayed in the browser.

How could I solve this problem? Do I have to set one of the layer as the base map and add other layers by using var vector? Then how can I convert those layers to .json file?


texts: Mapbox/Leaflet - how to generate evenly spaced coordinates inside a polygon

texts:
I'm trying to generate an evenly spaced grid of coordinates inside a polygon. I know that I can generate random points like follows:

const polygon = L.polygon([somePoints]).addTo(map);
const bounds = polygon.getBounds();

const y_max = bounds.getSouth();
const y_min = bounds.getNorth();
const x_max = bounds.getEast();
const x_min = bounds.getWest();

const lat = y_min + (Math.random() * (y_max - y_min));
const lng = x_min + (Math.random() * (x_max - x_min));

const coordinate = turf.point([lat, lng]);

What I'm struggling with is preventing random clusters of points. Are there any guards I can place to make the generated coordinates evenly spaced (or as close to that as possible)?


texts: ArcMap VRP-StreetMap Premium-Avoid Interstates Restriction?

texts: Is there a way to add an "Avoid Interstates" restriction to the vehicle routing problem in ArcMap, using StreetMap Premium (HERE 2016 R2 specifically)?


texts: I'm viewing a 3D shapefile of Cambridge buildings in QGIS 2.18. While I'm able to rotate and move the top-down view, I cannot seem to find an option to move the camera to the side (so the 3D part is actually viewable). Is there any option to do so, or is top-down the only viewport possible?


texts:
I am aware of Microsoft Bing Maps Aerial licensing changes with ArcGIS for Desktop at the end of this year.

My question here is why I have two different ArcMap I saved had them in it.

One was able to show it and the other would not allowed me to show me?

What is the reason for that?

ArcGIS 10.1 SP 1

Here is screenshot:


texts: Geodjango - trying to get points within a polygon

texts:
I'm going through the Geodjango tutorial and trying to implement in my own project - I have loaded data from a shapefile into my model/database and I have a separate model that has a PointField. I am trying to find all of the points in a polygon area but I can't figure out why my queries are returning empty.

class Neighborhood(models.Model):
    boroname = models.CharField(max_length=13)
    borocode = models.IntegerField()
    countyFIPS = models.CharField(max_length=3)
    nta_code = models.CharField(max_length=4)
    nta_name = models.CharField(max_length=75)
    shape_leng = models.FloatField()
    shape_area = models.FloatField()
    mpoly = models.MultiPolygonField(srid=4326)
    objects = models.GeoManager()

other model:

class WayPoint(models.Model):
    complaint = models.ForeignKey('Complaint')
    geometry = models.PointField(srid=4326)
    objects = models.GeoManager()

I have tried a few different things, including following the tutorial directions and manually typing in a Point that should definitely return something, but everything I try returns nothing.

In my view I have:

points = WayPoint.objects.all()
for point in points:
    pt = point.geometry #so this gets the PointField
    pts = Neighborhood.objects.filter(mpoly__contains=pt)

...and I get zero results for every WayPoint.

I have also tried(from the tutorial):

pnt_wkt = 'POINT(-73.3385 40.7245)'
obj = Neighborhood.objects.filter(mpoly__contains=pnt_wkt)

Nothing.

I've gone through the tutorial a few times and I can't figure out what I am doing wrong. I am new to GIS and am having trouble trying to troubleshoot the issue.

Ultimately I am trying to loop through and get all of the WayPoints in each Neighborhood, which I will eventually put on a map. But I can't even get any of my Neighborhood queries to return anything.

I feel like I must be missing something obvious here...

Edit: I went through the tutorial again and did it exactly with the WorldBorder dataset and tried my queries against that. My data set is for neighborhoods in NYC, so the point I'm using that definitely should return a polygon is a point in Times Square. When I query the neighborhood dataset I get an empty set, and I have the World Dataset at least returning back United States now. I don't understand why the neighborhood dataset is returning nothing.


texts: How to Convert Property Survey Monument Marker Coordinates to State Plane?

texts: I have a set of Connecticut monument locations (a monumented property survey using monuments designated CGS Mon. No. 1577-1580).  Their coordinates appear to me to be in meters (244536.84 N, 386409.67 E).  I need them in CT State Plane feet (correct values should be approx.746000 N and 786000 E).  Simple meters-to-feet misplaces them, as does creating them in UTM and re-projecting to state plane.  The original data specifies no coordinate system or datum.  Everything I can find online anticipates the markers will be in geographic coordinates, but they're clearly not.  Does anyone know what these generally start in or how to convert them? (offset is about 10 miles and not just shifted, if the markers ought to be along the road -- not sure if so)


texts: Can layers from Spatialite db be used as input for a Sextante model?

texts:
I'm trying to build my first models in SEXTANTE and already fail at the start. It seems not to be possible to add a vector layer which derives from a database. Orginally, the layers are from a .mdb. I also imported the layers into a spatialite database.

When running the model with those layers as input, the excutions breaks with an error:

Error executing algorithm 0
Wrong value: dbname='P:/pathtodb/Grunddaten.sqlite' key='PKUID' table="monitoring_area" (Geometry) sql=

When saving the layers as shape files first and adding to the project, the model runs without a problem.

Is it in general not possible to use layers from db's or do i have to do some special stuff to get the model running?
Exctracting stuff into shapefiles from db's is sooo ...

Thanx


texts: Extracting 2 groups of numbers from string in QGIS Field Calculator?

texts:
I have an attribute field that contains strings like "iuyluf45567kjyyr347fklj". All strings contain various amount of characters and digits (there is no clear pattern) but each string contains 2 groups of numbers. I have to extract those numbers as new attributes. I managed to extract first number using Field Calculator:
 regexp_substr('iuyluf45567kjyyr347fklj', '(\\d+)') gives me 45567.
But I have no idea how to extract the second one.


texts:
I have problems with QGIS 2 crashing and first I tried to purge and reinstall it. So I removed .qgis2 folder from ~/ and did all that apt-get remove --purge qgis etc., so commands like

dpkg -l | grep qgis, dpkg -l | grep qgs, find / -name '*qgis*', find / -name '*qgs*'

were all giving me empty results. That means there was no single file or directory on my Ubuntu 16.04 containing "qgis" or "qgs" in it's name.

So I proceeded with installing QGIS and to my surprise all of my custom preferences were preserved - that means added repositories and global variables that I set before.

So how can I purge QGIS completely, so there is no single byte of QGIS-related data on my disk? Note I'm using Ubuntu 16.04.


texts: How to arrange own tiles without projection in OpenLayers 3?

texts:
I have own tiles (.png) of 512x512 pixels and I would like to display them in OpenLayers 3 without projection (for now). Therefore I found a way to use the ZOOMIFY projection but with a "ol.layer.Tile"-Layer.
(original source: https://groups.google.com/forum/#!topic/ol3-dev/VVdNXHwiZEk)

So far it works more or less, but I am encountering problems providing the right extent of the layer.
I have a map DIV of 1024x512 pixels and strangely for zoom level 0: only the left tile is displayed (the right one is missing).

Zoom level 0 has a resolution of 2 (check the variable resolutions) and therefore I thought that I need an extent of 2048(x) and 1024(y) to display 2 tiles of zoom level 0. [1][2]

My guess is that the provided extent causes the problems.

Any ideas how to improve on this?

Here's a jsfiddle: http://jsfiddle.net/vb53xz20/

[1]tile1: services.arcgisonline.com/arcgis/rest/services/ESRI_Imagery_World_2D/MapServer/tile/0/0/0.png

[2]tile2: services.arcgisonline.com/arcgis/rest/services/ESRI_Imagery_World_2D/MapServer/tile/0/0/1.png

And the code:

tileSize = 512;

projection = new ol.proj.Projection({
    code: 'ZOOMIFY',
    units: 'pixels',
    extent: [0, 0, 1024, 1024]
});

projectionExtent = projection.getExtent();

var maxResolution = ol.extent.getWidth(projectionExtent) / tileSize;
window.resolutions = [];
for (var z = 0; z <= 10; z++) {
    resolutions[z] = maxResolution / Math.pow(2, z);

}

urlTemplate = 'http://services.arcgisonline.com/arcgis/rest/services/ESRI_Imagery_World_2D/MapServer/tile/{z}/{y}/{x}';

tileLayer = new ol.layer.Tile({
    source: new ol.source.TileImage({
        tileUrlFunction: function(tileCoord, pixelRatio, projection) {
            tileCoordGlobal = tileCoord;

            return urlTemplate
                .replace('{z}', (tileCoord[0]).toString())
                .replace('{x}', (tileCoord[1]).toString())
                .replace('{y}', (((-tileCoord[2])-1)).toString())
            ;
        },
        wrapX: true,
        projection: projection,
        tileGrid: new ol.tilegrid.TileGrid({
            origin: ol.extent.getTopLeft(projectionExtent),
            resolutions: resolutions,
            tileSize: tileSize
        }),
    }),
    extent: projectionExtent
});

view = new ol.View ({
    projection: projection,
    center: [1024, 512],
    extent: projectionExtent,
    zoom: 0,
    resolutions: resolutions
});

window.map = new ol.Map({
    layers: [tileLayer],
    target: 'map',
    view: view
});


texts: arcpy export - unable to set exact extent of dataframe

texts:
I am trying to use arcpy's ExportToPNG function to produce tiles for Nasa WorldWind, which will require very specific extents of outputted tiles.  Pretty simple code - abbreviated below:

 mxd = arcpy.mapping.MapDocument(mxdPath)
 df = arcpy.mapping.ListDataFrames(mxd)[0]
 xmin, ymin, xmax, ymax = getWorldWindTileBounds(tileX, tileY, level)

 newExtent = df.extent
 newExtent.XMin, newExtent.YMin = xmin,ymin
 newExtent.XMax, newExtent.YMax = xmax,ymax
 df.extent = newExtent

 tileFilePath = '%s/%s/%s/%s_%s.%s' % (cacheDirectory, level, tileY, tileY, tileX, tileFormat)
 tileDir = os.path.split(tileFilePath)[0]
 if not os.path.exists(tileDir):
      os.makedirs(tileDir)

 if 'png' in tileFormat:
      arcpy.mapping.ExportToPNG(mxd, tileFilePath, df, df_export_width=512, df_export_height=512)
 else:
      arcpy.mapping.ExportToJPEG(mxd, tileFilePath, df, df_export_width=512, df_export_height=512)

The extent of outputted tiles is very close, but not identical to the extent set in this block of code.  In reviewing the documentation for the arcpy DataFrame extent property, I found this: "If the aspect ratio of the extent does not match the shape of the data frame, the final extent will be adjusted to fit the new extent within the shape of the data frame. In other words, if you set explicit X, Y coordinates, you may not get the same values returned if you attempt to read them later."

Since I am using the dataframe instead of a page layout, I initially didnt think was applicable to my use case.  But, I have tried all types of shenanigans to set dataframe elementWidth/elementHeight properties to no avail.

Does anyone know how I can force the export to match the extent I set exactly?


texts:
I am running GeoServer 2.16 with GDAL 2.2 on Ubuntu 18.04.

I would like to use Image mosaic with Sentinel data on *.jpg2 format.
I have already seen this but it is referring to another version than I am using.

Following this tutorial, I have downloaded the GDAL Extension and but I think I need GDAL native library for reading JPEG2000 because Image mosaic is not able to read jp2 extensions.

Following the stores present on my local installation of GeoServer.
I see JP2K(Direct) for reading .jp2 file format.

But this extension is not working. Maybe because I am missing Kakadu (which is a proprietary software so I'll exclude it)?

Following the output of gdal-config --formats

gxf gtiff hfa aigrid aaigrid ceos ceos2 iso8211 xpm sdts raw dted mem jdem envisat elas fit vrt usgsdem l1b nitf bmp airsar rs2 ilwis rmf leveller sgi srtmhgt idrisi gsg ingr ers jaxapalsar dimap gff cosar pds adrg coasp tsx terragen blx msgn til r northwood saga xyz hf2 kmlsuperoverlay ctg e00grid zmap ngsgeoid iris map cals safe sentinel2 derived prf mrf webp epsilon wcs wms plmosaic wmts dods grib bsb openjpeg netcdf hdf5 hdf4 ogdi gif jpeg png pcraster pcidsk rik ozi pdf rasterlite mbtiles postgisraster arg

I've really stacked about this and I have no idea how to upload GeoServer image in GeoServer.

I am not able to download other plugin libraries (https://geoserver.geo-solutions.it/edu/en/adding_data/gdal_format.html )


texts: How to sort a column in attribute table programmatically

texts: Is there any way to sort ( alphabetically ) a column in the attribute table programmatically (without clicking on the column header) in QGIS ?


texts: Features of PostGIS layer are only selectable in attribute table but non on map canvas

texts:
My features of a PostGIS layer are displayed in the map canvas in QGIS and projected properly at the right place.

They are not selectable in graphically in the map. But they are selectable in attribute table.

So it does not seem to be a problem of granting rights to select/edit the data.

My PostgreSQL 12 server contains 2 databases. All tables of all schemas of just one from the databases show these behaviour. In the other database every geodata-behavoiur is as expected in QGIS.

Inserting test data/tables in the PostgreSQL scheme via QGIS-database-export throws following exception:
Function addgeometrycolumn(unknown, unknown, unknown, integer, unknown, integer) is not unique.

(It's no problem to create (new) views within the misbehaving scheme)

Any idea what went wrong and how to fix it?


texts:
I downloaded a data set 'SRTM Arc-Second Global' from the USGS EarthExplorer (GeoTIFF 1 Arc-second). Apparently, the DTM data type is Int16 whereas I need Float. I am trying to convert the format using the Raster -> Conversion -> Translate (Convert Format) ... dialogue in QGIS. However, if I run e.g.

gdal_translate -of GTiff
-ot Float32
-co COMPRESS=LZW (lossless compression)
 /Downloads/Tra_Vinh_.tif
 /Downloads/Tra_Vinh_float.tif

I receive the following error:

  ERROR 6: Too many command options '/Downloads/Tra_Vinh_.tif'

If I use less command options, e.g.

-ot Float32
-co COMPRESS=LZW (lossless compression)
/Downloads/Tra_Vinh_.tif
/Downloads/Tra_Vinh_float.tif

or

-ot Float32
/Downloads/Tra_Vinh_.tif
/Downloads/Tra_Vinh_float.tif

It says:

  The process failed to start. Either the invoked program is missing, or
  you may have insufficient permissions to invoke the program.


texts:
Is there a tool to create mask between bridge line/point on road? The requirement to have gaps 0.2mm between road and bridge and the offset fill with white color. For now, I add a white line attach to bridge symbol but the result not that great. Looking for improvement and better result.

Thanks!


texts:
I suspect I'm trying to do the same thing as in Convert image in KMZ to polygon. Given a kml displaying an image within a given lat/long boundary, what are the steps I follow to use Quantum GIS to convert this KML to a vectorized polygon? The image is simply a solid color map -- I.E. the associated PNG simply has each pixel as a set color or as a transparency, and I'm intrerested in being able to query if an arbitrary lat/long is within the bounds of the vectorized polygon.

Edit: It doesnt look like I can open the kml directly. Its raster image is a PNG. How do I set the lat/long bounds of the image if I simply open this PNG as a raster layer?


texts:
I have a field that has three entries as strings: "278957", "278961", and "12345678". When I use if/elif/else I can correctly replace the first two conditions in my code below but the problem is that for all entries that do not meet the conditions the values are replaced with . I thought writing "else: dsm == dsm" would preserve the original values if no conditions were met but it instead it overwrites the values to . Where am I going wrong?

  def ifDSM(dsm):
    if dsm == "278957":
      return "10002343"
    elif dsm == "278961":
      return "10000550"
    else:
      dsm == dsm


texts: Using multiversion view trigger to maintain unique ID in ArcSDE for Oracle?

texts:
I'm trying to identify the best way to automatically maintain a unique id column in Oracle ArcSDE.  I don't want to use a class extension, since I've multiple third party users of the data and it's too much of a headache.  I thought I was being clever by editing the insert trigger created by the creation of a multiversion view for the feature class.

I created a sequence in Oracle, and then tried to use sequenceName.NEXTVAL to insert that into the appropriate column.  The trigger compiles fine, and I can edit the feature class and insert new features just fine, but my sequence value is not getting inserted into the row.  For example, I wrote

addNextVal := address_seq.nextval;
INSERT INTO SDE.A746 VALUES (next_rowid, addNextVal,:new.SUITE, ...

but it didn't work.

Any thoughts on the approach, and what I might do to solve this problem?


texts:
I am working on a project that might need to use GSM geolocalisation instead of GNSS. The problem is I have never implemented something like that.

A lot of systems using this technology, seem relatively affordable so I doubt the companies selling them are paying monthly fees to operators.

Do I need to subscribe to an operator like I would with a cell phone? If no, how do i access the services I need?