texts: Creating/generating LDU polygon boundaries of Canada?

texts:
Back Ground on issue:
http://www.opennorth.ca/2013/03/05/open-postal-code-data-now.html

Related Question:
Where can I find Canadian postal code geometries?

Canada Postal Unit: LOR 1B7
Canada has released Forward Sortation Area Boundary(FSA) Boundaries for a Postal Code for example LOR 1B7, the FSA code is the first 3 letters: LOR:

Currently only a few commercial companies have MultiPloygons that can be used to represent
the Local Delivery Unit(LDU) for example LOR 1B7,the LDU code is the last 3 letters 1B7:

these commercial companies would provide a shapefile that contains all "LDU"s of Canada selling it for the tens of thousands.

example Shapefile from  Platinum Postal Suite:

How can one implement  LDU multipolygons?

How do commercial companies obtain this information to do such a rendering?

update
We were able to implement LDU Boudnaries for CA example: LOR 1B7,.   our API boundaries-io
www.boundaries-io.com


texts: Using osgeo modules in ArcGIS10.1 and QGIS 1.8 python shells

texts:
This is related to an old question of mine - Issues with osgeo - qgis.core and arcpy modules

Now in new versions of all the software QGIS Lisboa (1.8), ArcGIS 10.1 and pyScripter  2.5.3. They all use python 2.7

I can't get the following to work.

>>> import osgeo
>>> from osgeo import ogr

arcgis 10.1 and pyscripter fail here.

>>> import os
>>> os.chdir(r'L:\Data_Admin\QA\test_data\Boundaries\Local_Govt\TRC\TAB')
>>> driver = ogr.GetDriverByName('MapInfo File')
>>> fn='trc_boundary.tab'
>>> dataSource=driver.Open(fn,0)
>>> layer = dataSource.GetLayer(0)

 >

      feature = layer.GetFeature(0)
      extent=layer.GetExtent()
      extent
          (-12895.844282306107, 376810.87105960253, 7944810.84780738, 8222992.984638059)
      numFeatures=layer.GetFeatureCount()
      geometry = feature.GetGeometryRef()
          Traceback (most recent call last):
            File "", line 1, in
          AttributeError: 'NoneType' object has no attribute 'GetGeometryRef'

QGIS python shell fails here. Not sure why - I checked http://www.gdal.org/ogr/classOGRGeometryCollection.html but it is not helpful.

my

  PYTHONPATH=C:\Python27\ArcGIS10.1;C:\OSGeo4W\apps\python27; C:\Program
  Files (x86)\Quantum GIS Lisboa

I have installed the gdal python bindings for arcgis but then where is ogr?

also I can't seem to run

from osgeo import gdal
dataset = gdal.open("c:/abc.img")

  Traceback (most recent call last):   File "", line
  1, in  AttributeError: 'module' object has no attribute 'open'


texts: How to retrieve the tile URL in OpenLayers 3?

texts:
I have a question about Openlayers3 , I have the below code that initializes my map on my small demo application:

var map = new ol.Map({
    layers: [
        new ol.layer.Tile({
            source: new ol.source.OSM()
        })
    ],
    target: 'map',
    controls: ol.control.defaults({
        attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
            collapsible: false
        })
    }),
    view: view
});

You can see a demo HERE

Now my question is how do I get the Tile url , so that I can store it locally using localstorage ? how do I get the Tile url ?

I saw the ol.TileUrlFunctionType() , but I am not sure how to use it ? can anybody help me understand how to get the tile url ? (can can play around in the Chrome Developer Tools for the demo that I have provided.)


texts:
I'm working with GeoServer and OpenLayers 3, I have a hosted layer in GeoServer that I want displayed using OpenLayers 3 as a WFS layer.

It doesn't show any errors, but I don't get the map. It works with WMS, but not with WFS. Please can anyone help me to fix that?

This is my code:

var v=new ol.layer.Vector({
           source: new ol.source.Vector({
                format: new ol.format.WFS({
                    version: "1.1.0",
                    url: "http://localhost:8080/geoserver/wfs",
                    featurePrefix: "opengeo", //workspace
                    featureType: "opengeo:region_geo", //layer name
                    featureNS: "http://yourdomain/application/catalogLayer",
                    geometryName: "geom",  //feature name in database
                })
            })
});
var map = new ol.Map({
          target: 'map-id',
                  layers: [
                            v
              ],
 view: new ol.View({
 projection: 'EPSG:4326',
      center: [0, 0],
      zoom: 1
    })
     });

I get this result :


texts: OpenLayers / Mapserver WFS Filter: missing

texts:
I'm trying to filter features in OpenLayers when moving a JQueryUI slider. It works like this:

EDIT: full files available here on GitHub.

JQueryUI slider

When moving the slider cursor, minSelection and maxSelection values are defined. I need to show only features with minSelection < height < maxSelection. I've defined a filter that takes the current min and maxSelection and makes a query on the WFS, applying it to the vector layer (curlayer is the current vector layer object):

heightFilter = new OpenLayers.Filter.Comparison({
    type: OpenLayers.Filter.Comparison.BETWEEN,
    property: 'height',
    lowerBoundary: minSelection,
    upperBoundary: maxSelection
});

curlayer.filter = heightFilter;
curlayer.refresh({force: true})

OpenLayers.js

var _projObj = {
    wgs84 : new OpenLayers.Projection('EPSG:4326'),
    mercator : new OpenLayers.Projection('EPSG:900913'),
    osm_wms : new OpenLayers.Projection('EPSG:3857')
};

uses_layer = new OpenLayers.Layer.Vector("US Layer", {
    strategies : [new OpenLayers.Strategy.Fixed()],
    projection : _projObj.wgs84,
    visibility : true,
    displayInLayerSwitcher : false,
    protocol : new OpenLayers.Protocol.WFS({
        version : '1.0.0',
        url : 'http://46.105.19.68/cgi-bin/mapserv?map=/home/fradeve/public_html/ark-oia/ark-scrmap/wfs.map&service=WFS',
        featureType : USType
    })
});

Mapserver

LAYER
    CONNECTION "host=46.105.19.68 user=** password=** dbname=sipdb"
    CONNECTIONTYPE POSTGIS
    DATA "geometry from (select gid, layer, the_geom as geometry, n1, n2, n13 as height from us) as pseudo_table using unique gid using srid=4326"
    NAME "us"
    DUMP TRUE
    METADATA
        "wfs_srs"         "EPSG:4326"
        "gml_featureid"   "gid"
        "wfs_title"       "us"
        "wfs_typename"    "us"
        "gml_include_items"       "all"
        "wfs_version"     "1.0.0"
        "wfs_enable_request" "*"
    END
    PROJECTION
        "init=epsg:4326"
    END
    STATUS ON
    TYPE Polygon
    UNITS METERS
    CLASS
        STYLE
            ANGLE 360
            ANTIALIAS TRUE
            WIDTH 1
        END
    END
END

The XHTTP Post response

Here is what I get when moving around the slider cursor:

Request payload

<?xml version="1.0" encoding="UTF-8"?>
<wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="WFS" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd">
<wfs:Query xmlns:feature="http://localhost/cgi-bin/mapserv.exe" typeName="feature:us">
  <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
     <ogc:PropertyIsBetween>
        <ogc:PropertyName>height</ogc:PropertyName>
        <ogc:LowerBoundary>
           <ogc:Literal>870</ogc:Literal>
        </ogc:LowerBoundary>
        <ogc:UpperBoundary>
           <ogc:Literal>900</ogc:Literal>
        </ogc:UpperBoundary>
     </ogc:PropertyIsBetween>
  </ogc:Filter>
 </wfs:Query>
</wfs:GetFeature>

Response

<?xml version="1.0" encoding="UTF-8"?>
<wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs" xmlns:ms="http://localhost/cgi-bin/mapserv.exe" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd http://localhost/cgi-bin/mapserv.exe http://46.105.19.68/cgi-bin/mapserv?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=feature:us&amp;OUTPUTFORMAT=XMLSCHEMA">
    <gml:boundedBy>
        <gml:null>missing</gml:null>
    </gml:boundedBy>
</wfs:FeatureCollection>

So...

Where is the error? Everything seems fine to me...


texts: Error in using projection system with 1 standard parallel instead of using two?

texts: I have to define a new projection system in ArcGIS but to define the system I am having the parameters for Lambert Conformal Conic Projection with 1 standard parallel instead of 2 standard parallel. I want to know how much my locations will deviate.


texts: Getting line FID from polygon ITopologyGraph

texts:
I want to export polygon Arc list to txt file for that

I created topologygraph for personal geodatabase feature class (polygon)
using  ITopologyGraph::build.

I got polygon FIDs but I am not getting IDs for individual edges of polygons.


texts: Why is the CSVT file changing my real values to null?

texts:
I made a CSVT file to change desired real data to string data. After importing the original CSV file, that was linked by file name to the CSVT file, the string data appears as normal however all the real data has been replaced with NULL values! Why is this happening?

With in the CSVT I have made sure there are no spaces, and I have also made sure the file name is exactly the same as the CSV. Any suggestions would be helpful!


texts: Form submit to mapbox dataset via Javascript API

texts:
I have a form on a webpage that has a map the user can click on to populate the form's latitude and longitude fields. See it live.
I have an empty dataset created in Mapbox Studio and have created an accessToken which has the secret datasets:write scope selected, as seen in this screenshot.

Challenge: My form will generate a GeoJSON string out of the form fields, which I want to append to my mapbox dataset via a call to mapbox's API. The dataset should capture and show all locations submitted on that form.

How do I go about it? More specifically, if I have my username, dataset id and my accessToken, what should be the syntax of my form's submit action?

References:

this github discussion at a similar project that successfully got a GPS Logger app to post to a mapbox dataset via a server script. (server side script was needed there to be listening for the app and posting stuff to mapbox that the app couldn't; I believe we can bypass that in a form's case)
Mapbox API documentation for datasets that I haven't been able to properly understand and apply to my case.


texts: Missing values for Choropleth Map in QGIS

texts:
I am creating a Poverty Choropleth from a vector file using polygons to represent each county in the United States. I joined the poverty Excel file with a text file to convert the poverty column from a string to an integer.

I used a graduated symbol style, but some of my states are not getting filled.

If I used a single symbol, all my states appear just fine like this:

I am completely new to QGIS, I would like to understand how to fix this?

Reference files

shapefile: https://drive.google.com/open?id=1UapPQYe4XKkPVJSotbYTiltWGy_rUDkl
poverty data: https://drive.google.com/open?id=1IGuE53du_qqJntbr8ZOkp2Tkou77Vrfz
text file forcreation an integer column: https://drive.google.com/open?id=18nxh6YSdVgZVKr-PVM3ZrK9cpSR_YLQ1


texts: I have some coordinates in QGIS. I want to sample the values corresponding to those coordinates on a layer. I know that I can do that for the exact point using 'Point Sampling Tool'. Is there also a way to not only sample the exact point but an area of about 9 point around the coordinate using the nearest neighbor method?


texts:
When I edit a processing script (QGIS 3.2) with right click > Edit script... in the processing toolbox, save it and then try to execute it by double clicking it in the processing toolbox, the version that was loaded at QGIS start is executed, not the one just edited. The only (painful!) way to execute my edited script is to restart QGIS 3 any time I made an edit.

Deleting the __pycache__ folder under ...processing/scripts/ seem to have no effect.

Is there another way to update a script to the edits just made? Like the plugin reloader?

Worth raising an issue?

UPDATE
cp. https://issues.qgis.org/issues/19934


texts: QGIS .shp joined to xlsx.vrt; Classify works, Rule-based does not

texts:
Very simple set up. Tiger .shp file as a layer. Has a join to an xlsx non geo attribute table as a .vrt

.shp has join on MTFCC to MTFCC in xlsx.vrt. xlsx.vrt, has a string field with a brief label for MTFCC codes.

I go to classify on the joined label field and it works. However when I switch to Rule-based (where it copies what you did in classify) it doesn't. Asking for a count shows 0 hits for each rule.

Another odd behavior, perhaps a clue to above, when in classify, in the .shp layer, and I classify based on the label in xlsx.vrt, it creates classifications for every row in xlsx.vrt (many of which are not needed from the .shp file). This results in may sub listings under the .shp layer that actually have no data.

Ideas?


texts:
I'm currently working on a ArcGIS ModelBuilder Project where I want to use "Add Join" to look through a list of species (Table 1: converted from Excel -> Make query table -> Copy rows (to get index)) and flag up the same ones from a different table (Table 2) I made that contains some of the species that's in the other table (Table 2) and give me its classification (which is associated with the specie in table 1).

For this job, "Add Join" seems perfect, however it seems to be malfunctioning.

First off, I can't just add Table 2 directly to "Add Join" as "layer name or table view" BUT if I run the module, add table to "add to display" I can select the one from table of content. I find this to be super weird! This makes my module have some problems as it will keep stopping on other tables that I throw at it, for example if I want to do a different area or whatever.

I have also attempted to use "Join Field" which is much less picky in terms of what types of tables you throw at it but It doesn't give my the classification of the species at all. The entire row is just empty.

I'm not sure if I managed to explain my problem properly, hence I added a picture.


texts: Why doesn't Dissolve with stats plugin work in QGIS 2.14?

texts:
In ArgGIS 9.3 there is a function of ArcToolBox named Summary Statistics (Analysis).

I'm finding a similar function on QGis.
One of these is Dissolve with stats (plug in) but on my version of QGIS (2.14.1 Essen) don't work... "local variable 'nElement' referenced before assignment See log for more details"

Message Log error: Traceback (most recent call last):
              File "C:/Users/Giuseppe Cillis/.qgis2/python/plugins\DissolveWithStats\dissolve_stats.py", line 71, in run
                self.dlg = dissolve_stats_dialog.DissolveWithStatsDialog(self.iface)
              File "C:/Users/Giuseppe Cillis/.qgis2/python/plugins\DissolveWithStats\dissolve_stats_dialog.py", line 98, in __init__
                listRes = self.calculateFields(listKeep, listStats, output)
              File "C:/Users/Giuseppe Cillis/.qgis2/python/plugins\DissolveWithStats\dissolve_stats_dialog.py", line 274, in calculateFields
                listAttrs[uniqueValuesDissolveField.index(x)].append(y)
            ValueError: u'LAVELLO' is not in list

Instead, I tried it on an old version (QGIS 2.8 Wien) and it works.

Can i resolve this problem?
Is there an alternative to Dissolve with stats?


texts: Filtering by secondary attribute in PostGIS. Issues with NULL

texts:
I'm new to PostGIS. I'm trying to perform a dissolve operation on polygons depending on a particular attribute fields called priFunc and priForm.
My SQL query is
   SELECT ST_Union(geom) AS new_geom, priFunc, priForm
   FROM os_greenspace_layer
   GROUP BY priFunc, priForm

This works fine and my output looks like this

Next, I'd like to remove any features which have a priForm of "Manmade Surface" and omit them completely. So the code now is
   SELECT ST_Union(geom) AS new_geom, priFunc, priForm
   FROM os_greenspace_layer
   WHERE priForm <> 'Manmade Surface'
   GROUP BY priFunc, priForm

This gives an output that looks like this

So that works, but it also removes all the features where priForm is NULL and I want to keep those. I've tried using COALESCE to assign a value to the NULL fields but that doesn't seem to work.
How can I do this?


texts:
I'm wondering if there's any other way in map cache to support multiple formats (png and jpeg for example) than to create a new tile set?

For example if I have a WMS 'source' called topo2_wms (that supports png and jpeg), and a tile set called topo2cache.

What's the best ways to create tiles in both png and jpeg?

Is it really necessary to create 2 tile sets, one called topo2cache_png and one topo2cache_jpeg?


texts: How do I merge two networks if they don't share nodes?

texts:
I have a street network and a subway network and I want to create a multi-modal network to analyze for Service Areas. The problem is that the two networks do not share nodes, and if a point is on one network, it cannot jump to the other.

I've been able to manually add lines between subway stations and the nearest intersection, and also manually specify a time to enter/exit the station, but is there a more automated way to do this? The task is rather mundane and takes a lot of time, especially when performing analyses on many networks.


texts: What is the difference between Leaflet and Mapbox?

texts:
What is the difference between Leaflet and Mapbox, and how are they used together?
Like the API and what exactly are they and is Mapbox using Leaflet?


texts:
I am having a difficult time working with ArcGIS. My files are in TAB format.

In ArcGIS I use the QuickImport tool.

I am able to select the input file, but it does not let me click on "OK". Any hints on that?

I have checked this thread:
Converting MapInfo TAB and/or MIF to SHP using free tools or ArcGIS for Desktop core product?
but I could not find a similar problem.


texts: Anybody here can  help me regarding calculating Vegetation Condition Index  (Kogan,2004) for Landsat?. Specially facing problem in NDVI_max and NDVI_min; which should be maximum and minimum value?


texts: Performant way to join 3D LiDAR mesh to 2D data

texts:
I'm new to 3D data and want to know what I should be searching for when I'm looking to find all the triangles in a 3D building mesh that fall within a 2D footprint.

The mesh comes from LiDAR and broken into 1km grids, the largest tile contains some 60m triangles there are 1,000 tiles to process.  I'm familiar with Python/QGIS/PostGIS and this seems like a problem others must have faced but I'm not getting any leads so think I'm not looking for the right terms where I've looked for 3D spatial joins in QGIS and generating 3D bounding box in QGIS from 2D polygon


texts:
I downloaded the H05 – PR-OBS-5 Accumulated precipitation at ground data from H-SAF. The Product User Manual states the dataset is in rectangular stereographic projection centred on 42°N, 10°E. I need to project it to the Web Mercator projection (EPSG:3857) to use it with my other datasets, preferably with GDAL.
This is the original dataset as downloaded in grb format and displayer in qGis.

As I couldn't figure the EPSG code of the aforementioned coordinate system I used simply:
'gdalwarp -t_srs ' + outSrs + ' -dstnodata ' + outNoData + ' -r near -multi -ot ' + outType + ' -of ' + outFormat + ' ' + inFile + ' ' + outFile

I format the code as string here as I'm calling gdalwarp from python with subprocess.call.
This produces multiple "ERROR 1: tolerance condition error" and an "ERROR 1: Reprojection failed, err = -20, further errors will be suppressed on the transform object.", but returns the following:

If I combine this image with my other data it doesn't align properly as it should. I am not familiar with grb format but it seems that GDAL cannot properly interpret the projection information from the dataset.
Does anyone knows how to properly project this dataset to the Web Mercator?
EDIT:
gdalinfo output:
ERROR 1: tolerance condition error
ERROR 1: tolerance condition error
ERROR 1: tolerance condition error
ERROR 1: tolerance condition error
Driver: GRIB/GRIdded Binary (.grb)
Files: C:/xxxx/xxxx/xxxx/xxxx/h0524/5km/daily/2018/08/07/h05_20180807_0000_24_rom.grb
Size is 1900, 900
Coordinate System is:
PROJCS["unnamed",
GEOGCS["Coordinate System imported from GRIB file",
DATUM["unknown",
SPHEROID["Spheroid imported from GRIB file",6378140,298.2529810614917]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433]],
PROJECTION["Geostationary_Satellite"],
PARAMETER["central_meridian",0],
PARAMETER["satellite_height",35785831],
PARAMETER["false_easting",0],
PARAMETER["false_northing",0]]
Origin = (-5571679.196145262569189,5574935.774084444157779)
Pixel Size = (5861.840290526315584,-12374.996168888888860)
Corner Coordinates:
Upper Left (-5571679.196, 5574935.774)
Lower Left (-5571679.196,-5562560.778)
Upper Right ( 5565817.356, 5574935.774)
Lower Right ( 5565817.356,-5562560.778)
Center ( -2930.920, 6187.498) ( 0d 1'34.78"W, 0d 3'21.45"N)
Band 1 Block=1900x1 Type=Float64, ColorInterp=Undefined
Description = 0.000[-] undefined ()
NoData Value=9999
Metadata:
GRIB_COMMENT=Estimated precipitation [kg/(m^2)]
GRIB_ELEMENT=ESTP
GRIB_FORECAST_SECONDS=0 sec
GRIB_PDS_PDTN=30
GRIB_PDS_TEMPLATE_NUMBERS=1 0 8 54 1 0 0 0 0 0 255 255 255 255 255
GRIB_REF_TIME= 1533600000 sec UTC
GRIB_SHORT_NAME=0 undefined
GRIB_UNIT=[kg/(m^2)]
GRIB_VALID_TIME= 1533600000 sec UTC
Band 2 Block=1900x1 Type=Float64, ColorInterp=Undefined
Description = 0.000[-] undefined ()
NoData Value=9999
Metadata:
GRIB_COMMENT=(prodType 3, cat 0, subcat 192) [-] [-]
GRIB_ELEMENT=unknown
GRIB_FORECAST_SECONDS=0 sec
GRIB_PDS_PDTN=30
GRIB_PDS_TEMPLATE_NUMBERS=0 192 192 0 0
GRIB_REF_TIME= 1533600000 sec UTC
GRIB_SHORT_NAME=0 undefined
GRIB_UNIT=[-]
GRIB_VALID_TIME= 1533600000 sec UTC


texts: Aggregating the attributes from nearby grids and assigning it to the parent grid in a fishnet

texts:
I have 700,000 grids generated to cover an administrative area. I want to calculate the sum of an attribute in its neighboring grids till 2nd order and assign it to each grid. To do so I have generated a buffer on each grid and identified which subsequent grids fall under a parent grid and summed their attributes,  but it is taking too long.

Is there a quicker way around this issue?


texts: How to get the color of pixel openlayes 2?

texts:
I'm trying to get the color of the pixel from the map in Openlayers 2.
Or is there is a function to get xyz values from rgb?


texts: How to fix the "Corrupt Shape file '' encountered -- record size 218972988 is invalid" error in FME Workbench?

texts:
I have inherited a project where part of the workflow is the execution of numerous FME Workbench files.  It has worked flawlessly for several hundred runs, but it gets tripped up on a very large shapefile(actual shp is 1586981264 bytes, dbf is 51949349 bytes
Type:                  Polygon
Number of Shapes:      775361   ).

Corrupt Shape file '<shapefilepath>' encountered -- record size 218972988 is invalid

ArcCatalog and shpinfo.exe have no trouble with it.

Based on some google searches, I think the issue is with the size of the shapefile but this might be outdated information:
http://groups.yahoo.com/neo/groups/fme/conversations/topics/3031
http://evangelism.safe.com/tag/google/

Is there a way to configure FME to allow for larger shapefiles?

FME Information:
Edition: FME Professional Edition (node locked-crc)
Version: FME(R) 2012 SP2 (20120417 - Build 12238 - WIN64)

OS:
OS Version:                6.1.7601 Service Pack 1 Build 7601
OS Manufacturer:           Microsoft Corporation
OS Build Type:             Multiprocessor Free
System Type:               x64-based PC
Processor(s):              8 Processor(s) Installed.

Intel64 Family 6 Model 44 Stepping 2 GenuineIntel ~3325 Mhz * 6
Total Physical Memory:     31,996 MB


texts: Where can I find a list of valid settings for expanded data defined labeling?

texts: I have seen this post What are valid values for "data defined" labeling settings?. Does anyone have any insight to the values within attribute tables required to satify the expanded "Data defined settings' in the labeling dialogue box. I am using 1.9


texts: Creating Map Tips with ArcGIS API for Flex

texts:
I'd like to have Map Tips display when a user hovers over, or clicks on, a feature in my Flex Application.

Would I do this in the authoring stage or is there code I write into my Flex application?


texts: QGIS problem with positions of imported waypoints

texts:
I'm a newbie to QGIS.

The waypoint data was collected on a Garmin etrex legend H, with the grid set to OSGB36.  Using Garmin's Basecamp software, I saved the waypoints as a gpx file (also xml etc with roughly the same result).  The survey data was taken in Dorchester, southern England.

I imported the data into QGIS using the GPS Tools plugin (in QGIS Essen).  The co-ordinate system in QGIS is OSGB36.  However the waypoints appear not in Dorchester, but somewhere south of Madagascar - interesting but not useful!

In DEFRA's Magic Map, one point for example should be 369002.6, 90328.4.  However this point is shown in QGIS as -2.440391, 50.711678.


texts: Leaflet.draw and Leaflet.edit has Cpu consumption very high?

texts:
I need to draw (or edit) a line/polyline to the map.

So i add points with the draw mode.

But the last move to add the last point is strangely Cpu consumer.

With this example : https://leaflet.github.io/Leaflet.draw/docs/examples/full.html

I increase the size to the map in 1600*1200 for increase Cpu consumption.

In the embeded browser, draw or edit is blocking because cpu core is at 100%... (ATOM)

But with the classic browser, CPU increase too (25% for one core i7)...

It's a bug ?

EDIT :

Leaflet version : 1.0.3

Leaflet Draw version : 0.4.9

Browser : Chrome or Firefox

OS/Platform : Win10 or linux 4.9.0

Classic test : Win 10 with Chrome browser

Embeded test : Linux 4.9.0 with embeded Chrome browser


texts:
We have a set of layers to which we want to attach some forms. I used to do this easily in QGIS, now our clients want to move to ArcGIS and they want to build a form to each feature class of the GDB. I did some researches and I found out that this could be done using Add-ins.

The client is not a developer, so he needs an easy way to create a simple form within ArcMap (the form that contains checkboxes for boolean fields, list of values, calendars, the button to load photos or files etc.).

How can we perform this function?


texts: What is the most efficient way to create a shapefile from resultset using geotools

texts:
I am facing a problem to write to shapefile (geotools) with respect to time, memory etc.

My workflow is something like reading spacial data from database Oracle with attributes and coordinates (can any point,line,polygon (very large data)) for that i am writing one record to shapefile and then flush the featurecollection so that ditch the outofmemory problem i am using DefaultTransaction. but when i do that it works fine for about 700 features but then the commit function takes more time to write to shapefile what i observed on starting about 2 min and then time keep increasing about 10 to 15 min to 30 mins and keep going... i try different thing like writing chuck in featuer (500) to shapefile but no help. I also observed that the total size of the shapefile writen through geotools is far more then writing shapefile using like arcobject or mapobject java.

here is my code please tell me if there is anyother way to write to shapefile in efficient way...

Transaction transaction = new DefaultTransaction("create");

        String typeName = newDataStore.getTypeNames()[0];
        SimpleFeatureSource featureSource = newDataStore.getFeatureSource(typeName);
        SimpleFeatureStore featureStore = (SimpleFeatureStore) featureSource;
        featureStore.setTransaction(transaction);

        while( _resultSet.next() )
        {
            setRecord();

            SimpleFeature feature = featureBuilder.buildFeature(null);
            featurecollection.add(feature);
            featureStore.addFeatures(featurecollection);

                transaction.commit();
                featurecollection.clear();
        featureCount++;
            if (featureCount % 10 == 0)
            {
                _logger.info("Rows Processed: " + featureCount);
            }

        }

        reportResults(featureCount);

        transaction.close();
    }

A part from that i also see an amazing thing using geotools when we call transaction.commit() it first copy features in to temp space but the amazing thing is that after about 4000 feature the temp files size is about 3GB. why is that i have no idea.. any comments on this will help me to understand the problem.

i tried it for 75000 points and 8000 lines (each line contains about 200 points). For lines this commit() function is behaving very badly.. by the way this is the mimimum size of data which i am testing using geotools.


texts: I am running two models using an iterator in each.  I want my output (feature class in a GDB) to be named after the field value from which it was selected as opposed to "I_feature1_join1', etc.


texts:
I have a map of property lines in MapServer and the lines look rough and have jagged edges and I wonder if there is anyway to make the lines appear smoother and more rounded in Mapserver 5.6.8?

The layer settings look like the following in XML:

<layer datasource="ds_PROPERTY" name="ds_PROPERTY" type="line">[datasource:ds_PROPERTY.mapfile-datasource]
    <class>
        <name>Properties</name>
        <style>
             <color>0 0 0</color>
            <size>3</size>
            <width>2</width>
            <outlinecolor>0 0 0 </outlinecolor>
            <antialias>TRUE</antialias>
        </style>
    </class>
    <opacity>100</opacity>
</layer>


texts: How to calculate angle deviation for points in ArcGIS and QGIS

texts:
I want to calculate angle deviation point layer ( Electricity Towers). I found Generate Near table tool in ArcGIS but it only calculates angle between two points. In that case I need to give temporary points and calculate for 3rd one.

Any tools or methods to calculate?

I am attaching screenshot of it. In Generate Near by tool I am getting angle for each point , but I want the angle between point no 4 and 5.

How do I get that?


texts: How to calculate a set of minimum bounding boxes for a polygon

texts: I need to calculate a set of minimum bounding boxes for a polygon. Id est having a complex polygon I want to envelope it with a set of small boxes instead of a big one.


texts: Filtering features based on attributes using IS NOT NULL does not seem to work

texts:
Trying to filter features based on whether one field has value or not.

After looking up a number of web pages (including the two from this forum), I believe the expression should be:

"name" IS NOT NULL

However, the above expression returns all the rows.

When I try "name" IS NULL, no row was returned.

Applying these expressions to other fields yields the same results. Can anyone shed some light on what I might have missed, please?

Relevant threads:
Selecting features with NULL attributes in QGIS?
How to select features where attribute is not NULL?

QGIS version
3.12.3-București


texts: How do map providers collect/update street names in the Middle East?

texts:
Spatial data in Middle eastern countries, is not as comprehensive as it is in European countries or the United States.

How do map providers/producers get street names, update new areas and all of these related things?

Do they have an agent or similar to provide them with the data ?


texts: How to remove duplicated points from a layer originally with duplicated points in QGIS? (Accidentally copied and pasted)

texts:
Basically i accidentally copied and pasted the same links into the same layer instead of another layer which i didnt notice until the end.

I know this sounds similar to other duplicated points questions, but with mine, the layer ORIGINALLY had duplicated links in them. If it helps though, the duplicated links are of different directions with each other. I tried remove duplicate geometries but it only considered where the links are instead of what direction they're pointing, which means the duplicate links that are pointing different directions are also removed.

Is there a way to remove the copied and pasted duplicates by perhaps asking the system to remove 1/2 of the links on the layer so it recognises the previous duplicates (for e.g. 2 links -> copied and pasted became 4 -> QGIS removes half of all similar links on the map -> 2 links again)?


texts: Mapping Kansas City based on X and Y Coordinates in R

texts:
I have a csv file in R that has coordinates of Kansas City, however, the values at these points aren't in any traditional longitude/latitude formatting that I am aware of.  My data looks like this:

Tract            X               Y
218.01       2797574          1143595
218.01       2799346          1144802
133.02       2786207           998301
...

Is there anyway that I can generate a map from this type of data that will also eventually allow for the visualization of other variables such as population or crime rate?


texts: Selecting all files in directory for merging in QGIS Processing?

texts:
I'm writing a generic script which involves writing shapefiles to a directory which are then merged together. After writing the files out to the Output folder, I'm trying to get the saga:mergeshapeslayers algorithm to merge all the files in the Output folder. I have used the Model Builder and although it is helpful to an extent, I find that it is used for specific purposes whereas I am attempting to make a script for generic purposes.

Code:

##Test=name
##Select_folder=folder
##Result=output vector

import os
import glob

path_1 = Select_folder
path = path_1
os.chdir(path)

def function():

    output = glob.glob(path_1 + './*.shp')
    x = 0

    while output[x]:
        for fname in glob.glob("*.shp"):
            outputs_1 = processing.runandload("qgis:fieldcalculator", output[x], 'Number', 1, 10, 0, True, 1 , "C:\Users\Me\Desktop\Output\\"  + fname)
            multiple_0 = glob.glob("*.shp")
            x = x + 1

        if x + 1 > len(output):
            processing.runalg("saga:mergeshapeslayers", output[0], ";".join(multiple_0) , Result)
            break
        else:
            continue

if path_1:
    function()
else:
   pass


texts: Accessing ee.ImageCollection("NOAA/GOES/16/FDCC") from Google Earth Engine

texts:
Can you advise if ImageCollection("NOAA/GOES/16/FDCC") from GOES-16 FDCC Series ABI Level 2 Fire/Hot Spot Characterization CONUS contain any data?
I was trying to review the map with Earth Engine's Code Editor but nothing was loaded into the map.
If Google Earth Engine is not the best source to access this data, what will you recommend for GOES-16 FDCC Series ABI Level 2 Fire/Hot Spot Characterization CONUS data?


texts: QGIS 1.8 Did Not Install Properly-- Will not recognize modules or DLLs-- conflicting with existing PyQt?

texts:
I know this has been asked and re-asked, but I can't seem to get any of the proposed solutions to work.  Upon clicking the start menu shortcuts to QGIS desktop, nothing happens.  When I run from command prompt, I first received the error that "qwt5.dll" was missing.  This was installed and present in the Quantum GIS Lisboa/bin folder, and I copied it into the QGIS app/bin folder, along with the next series of dll's it said were missing.  It then told me it could not find PyQt4, and then that the SIP module was missing and that python would be disabled.  I ensured that the paths were included in my environment variables, but no change.  I was curious if the existing versions of PyQt4 (and the accompanying SIP module) that were already installed on my computer could be the cause of this?

This is on my work machine which has heavy security measures in place. On my home machine, which also had PyQt4 and SIP installed previously, I had no issues with installation or launch.    Both machines are 32-bit Windows 7.  Does anyone have any ideas?

EDIT:  After much, much screwing around with paths and bat files, I got the desktop, browser, GRASS and MSYS to launch.  I still cannot launch OSGeo4W.... when I run the bat file in command prompt, I first got "findstr not recognized".... copied, pasted, re-ran... got "_path=C:/Apps/QGIS//apps/Python27/scripts  find: .exe no such file or directory, find: .bat no such file or directory "........hmm..


texts: Styling 1 polygon with multiple colors in set ratios - Leaflet

texts:
I want to color my polygon with multiple colors basis user defined ratio in Leaflet.
So lets consider an example:
There is a rectangle (polygon) and the defined ratio is 60:40. Then in this case the polygon should be colored with red only for 60% of the total area of the polygon and the remaining should be blue color covering 40% of the polygon.
The polygon can be of any shape (irregular or regular like rectangle, triangle)
Is there any work around the styling options? or maybe any plugin that I'm not aware of?
Leaflet version - 1.6.0
In the following code I want to implement 2 colors in case when it is 0|partially
function style_reg_v1_0_0(feature) {
  switch (String(feature.properties['concat( "gt" ,' | ', "reg" )'])) {
    case "0|fully":
      return {
        pane: "pane_reg_v1_0",
        opacity: 1,
        color: "rgba(35,35,35,1.0)",
        dashArray: "",
        lineCap: "butt",
        lineJoin: "miter",
        weight: 1.0,
        fill: true,
        fillOpacity: 1,
        fillColor: "rgba(56,162,10,1.0)",
        interactive: true,
      };
      break;
    case "0|partially":
      return {
        pane: "pane_reg_v1_0",
        opacity: 1,
        color: "rgba(35,35,35,1.0)",
        dashArray: "",
        lineCap: "butt",
        lineJoin: "miter",
        weight: 1.0,
        fill: true,
        fillOpacity: 1,
        fillColor: "rgba(190,190,190,1.0)",
        interactive: true,
      };
  }
}


texts: Generate line from unordered set of points

texts:
What is the best method to take a set of points and generate a line?  There are too many to simply guess a "connect-the-dots" situation & These points do not have an attributes in which they can be sequenced.

My first thoughts are to generate a small buffer to create a polygon or polyline from, but from here how would I efficiently generate a centerline from that road polygon?  I have read methods of collapsing parallel lines but that requires a TON of manual splitting of edges of the polylines.

I am open to trying new methods not necessarily the path I began above.  Open to using Arcmap, MapInfo, FME, Alteryx or any data format that can be helpful.


texts: How to transform data points from WGS84 to NAD27?

texts:
Preface: I have a set of lat and long data points from Google Maps, which I believe are in WGS84. My project data is in NAD27(BLM14). These points are in West Texas, where NAD27 differs from WGS84 by about 50 meters. Using QGIS, I loaded my shapefile into one layer and set the CRS to WGS84, then I loaded the same data again and set its layer to NAD27. I was hoping to see a difference between the two layers, but I saw none. (I zoomed in to 47:1.)

Question: Did I actually transform my data points from WGS84 to NAD27? If so, shouldn't I see a discrepancy? I checked the properties of the layers, and one says +datum=WGS84, while the other says +datum=NAD27. Am I missing something obvious? (I never took any GIS classes in school, and I've only been working at this for a few weeks.)

Should I use the NADCON converter at http://www.ngs.noaa.gov/cgi-bin/nadcon.prl to convert my WGS84 coordinate data to NAD27? Or is there a QGIS or (better) an OSGeo solution?


texts: OpenLayers 6.0.1 set custom center after load map

texts: I am using OpenLayers 6.0.1 web map. I have plot a new marker on map with custom image and want to put the map to be centered newly plotted marker position.


texts: qgis Error: Column type not supported using v.surf.idw

texts:
I have counts data from aerial measurements that I am trying to make an interpolation map from using Q.GIS 2.18.14.
I have done a tutorial first with test data, then compared the test data to my data and don't see any obvious differences. The test data column type = double, same as my data. Yet when I run interpolation via the Interpolation plugin I just get nans, and when I try the v.surf.idw GRASS plugin I get the error: Column type not supported.

Can someone help me understand this?

(I have checked projections are correct).


texts: send to WFS a custom sql query using jquery

texts:
If anyone please, could gimme me a hand on this question.
I have a web sql client that the user can write a sql statement and I want to sent it via WFS to geoserver, run it, and based on the results, to mark on map what I have found.

So, I know that the geoserver supports views and I can send parameters to a view, but, Isn't it possible to send my custom sql query directly to the geoserver?


texts: Offline Vector Tile Map for Android and iOS app

texts:
I am trying to generate vector files and store them in a MBtiles file to make them available for download within the app. (I have also tried with raster tiles and TileMill but the file were too large: 400MB for greater london up to zoom 17, 188MB with jpeg 70% compressed)

I have downloaded the OpenStreetMap city raw data in PBF from MapZen metro extract
I have put the data in a PostGIS Database using osm2psql and OSM Bright
I have used MapBox Studio's tilelive to generate the vector mbtiles (see https://github.com/mapbox/mapbox-studio/issues/1080#issuecomment-97189457)

But I'm getting a 1.3GB file for the sole greater London.

My questions:

Vector tiles are supposed to be much smaller than raster ones, any reason why I would get such an abnormally large file. (Nutiteq or Skobbler have packages of about 30MB for greater london)
If I do manage to generate them, what would be a good way to have them integrated in android and in iOS? Apparently this is not possible yet using MapBox SDK: https://github.com/mapbox/mapbox-gl-native/issues/584

OsmAndMapCreator allows to generate vector tiles in the OBF format which I don't think is possible to use outside of OsmAnd.


texts: Google Earth Engine: Difference in Area of Feature Collection when calculating using a reducer vs. when calculating using clipping

texts:
I am wondering why the two approaches to calculate the area of a feature collection return different results and which one is "correct"?

I clip the feature collection on a white image and sum up over the multiplied area

    var whiteImage = ee.Image().unmask().eq(0).rename('test')
    var trueAreaImage = whiteImageClipped.multiply(ee.Image.pixelArea());
    var trueArea = trueAreaImage.reduceRegion({
      reducer: ee.Reducer.sum(),
      geometry: validationRegion,
      scale: 10
    });

The other time I am using a reducer to generate the raster data and sum up over the multiplied area

    var reducedImage = groundTruth.reduceToImage(['test'],'anyNonZero').rename('test')
    var trueAreaImage = reducedImage.multiply(ee.Image.pixelArea());
    var trueArea = trueAreaImage.reduceRegion({
      reducer: ee.Reducer.sum(),
      geometry: validationRegion,
      scale: 10
    });

The result of the two approaches is significantly different.

https://code.earthengine.google.com/8baa2a6c27490ca44d7904f7ab6208be


texts: How to filter features displayed in WMS layer ArcMap

texts:
I've added a WMS layer (from a GeoServer) in ArcMap and trying to apply a filter (~definition Query?) so only features with certain attributes are displayed.

I want to filter on attribute RedlistCategory = CR

Is it possible to do this under layer properties (right click on Map Service in ArcMAP), parameters tab? What should i type in Parameter and Value? Maybe this is not the place to apply filters?

I've been Reading this but i dont understand what to type in Parameter and Value:
GeoServer help - WMS vendor parameters

From the WMS documentation: &Filter=<Filter><PropertyIsEqualTo><PropertyName>RedlistCategory</PropertyName>
<Literal>CR</Literal></PropertyIsEqualTo></Filter>&format=image/tiff
Is this useful?

WMS documentation (Swedish)


texts: Understanding QGIS errors when importing .csv file?

texts:
I am trying to import a .csv file as a layer in QGIS and keep getting a number of errors that I don't understand. Is there any documentation of QGIS errors available? Or can you point me towards a description of what QGIS sees as a valid .csv file? To me, the file looks ok in different editors.

The errors I get are (translated into English, so maybe not exact):

x data sets discarded because of invalid format

y data sets discarded because of invalid geometric definitions

the following lines were not loaded into QGIS because of errors:

invalid sentence format in line xyz, invalid x or y fields in line yxz, ...

there are zyx additional errors in the file.

I tried to find help on the internet, but I did not succeed. Now I don't know where to start because there are so many errors.

The problem exists in QGIS 2.0 (Dufour) and 2.8 (Wien). The errors look the same to me in both. I am trying to insert a .csv file that contains text, a time stamp, and lat and lon information.

The file header looks like this:

ID§$%text§$%timestamp§$%latitude§$%longitude

As you can see, I chose a set of delimiters that are - hopefully - not present in any Tweet ;) At least for the few example lines QGIS shows when importing the file, delimiting the field worked.

The texts contain emojis that are shown as, e.g.,  in my bash terminal with locale "de_DE.UTF-8". So maybe they are not proper UTF8?


texts: Anyone know if would be possible to "convert" a File GDB with a set of features classes, which contain Domain values and Subtypes, in GPKG format (for editing purpose)? What I'm not understanding is, in particular, how to upload Domain values for fields in a GPKG.


texts: Raster images losing quality when clipped?

texts:
I'm using the ArcGIS data management clip tool for raster, a jpg file. It is being clipped with a polygon. After the clip is successful, the clipped image is appearing in lower quality and the colors of the pixels are showing up differently, even when they seem to have the same value.

I have tried adjusting all of the raster environment settings to ensure they are the same, what could be causing this?


texts: How to select a polygon feature on mapservice?

texts:
I manage to publish a mapservice with lots of polygon.

I wish to select a polygon and see its attributes.

May I know how to I perform that with javascript API? There doesn't seems to be a straight forward solution on their sample page.


texts:
Was trying to replicate a RePast Agent Analyst simulation using just Python and arcpy. The script was about urban expansion. The script just changes the values of a column in a shape file. ArcMap's symbology just color codes the parcels in the map based on the values of the mentioned column. The script just needs a way to refresh/reload the display for every step ( when the values in the column are changed ) of the simulation to show the user the changes.

I tried arcpy's RefreshActiveView but it doesn't work. Is there a way to to do it using arcpy? Or do I have to use ArcObjects for this?


texts: Changing symbology of group of layer from a list of symbology layers with Arcpy?

texts:
I'm using arcpy to create a GUI in Arcmap that can import features and apply symbology with importing a list of symbology layers, but it doesn't work and without an error message.

    for x in range (0, (len(list2))):
          print('shp', list2[x])
          print('symb', list3[x])
          arcpy.ApplySymbologyFromLayer_management(list2[x] , list3[x])
    arcpy.RefreshTOC()

list2: layers to apply symbology;
list3: symbology layers

This is my code:

# Set outWorkspace
outWorkspace = r'c:\Users\HAIDRA\Documents\Desktop\essai'
mxd = arcpy.mapping.MapDocument("current")
style = askdirectory ()
styl_path.set(style)
# set the workspace
arcpy.env.workspace = style
symbology_layers = arcpy.ListFiles("*")
print ('le premier boucle symbology_layers', symbology_layers)
list3=[]
print('list3', list3)
list3.append(symbology_layers)
print ('list3', list3)
dfs = arcpy.mapping.ListDataFrames(mxd)[0]
lyrs = arcpy.mapping.ListLayers(mxd, "", dfs)
print ('lyrs', lyrs)
list2=[]
print('list2', list2)
list2.append(lyrs)
print ('list2', list2)
for x in range (0, (len(list2))):
    print('shp', list2[x])
    print('symb', list3[x])
    arcpy.ApplySymbologyFromLayer_management(list2[x] , list3[x])
# Refresh the Table of Contents to reflect the change
arcpy.RefreshTOC()


texts: How do I export XY data from QGIS to shapefile?

texts: How do I export XY data from a comma-delimited file to a shapefile using QGIS?


texts: What is the minimum `metadata` specification for the Open Data Cube?

texts:
There is a standard metadata definition here, but I would like to create a new one, with only the absolutely required fields.

What is the minimum set of values that can be used to define a metadata type in the Open Data Cube?


texts: Using all processor cores when exporting map to TIFF using ArcGIS Desktop?

texts:
By default, ArcGIS Desktop uses only one processor core when you export a map. Esri help talks about the possibility of setting environment parameters for geoprocessing tools, but found nothing about exporting maps. For larger map layouts, the export process on a single core can take a long time.

How can I enable more than one core to do the export process?


texts: Disable black background color of a satellite image in mapserver mapfile?

texts: I'm publishing rasters using Mapserver. How to disable background color of a satellite image in map files or How to set “Display Background value ”0“?


texts: Creating Multipolygon Shapefile from MultiLineString GeoJson using ogr2ogr?

texts:
Right now I have a GeoJson file with a structure like this:

{
"geometry": {
    "type": "MultiLineString",
    "coordinates": [
        [  <Coords line 1>
        ],
        [  <Coords line 2>
        ],
        [  <Coords line 3>
        ]
    ]
},
"type": "Feature",
"properties": {
    "time": 960,
    "value": 0.5
} }

I want to create a MultiPolygon shapefile from that but ogr2ogr throws an error using this command:

ogr2ogr -f "ESRI Shapefile" -nlt MULTIPOLYGON <out_file.shp> <file.shp> OGRGeoJson

ERROR 1: Attempt to write non-polygon (MULTILINESTRING) geometry to POLYGON type shapefile.

I've been searching other possibilities to achieves this and for example with QGis is quite simple, but I need a solution that can be used from terminal.

As a side note, all the lines in the geoJson starts and ends at the same point, so they make a closed line.


texts: The realm of cartography depicts many facets of the physical space within both urban and non urban settings.  Specifically within the urban setting lies the challenge of navigating spaces such as roads, sidewalks, and buildings.  What are some good representations of mapping accessible spaces for those with physical limitations?


texts: How to convert Point coordinates into CSV format?

texts:
The GDAL documentation describes how to convert a ShapeFile into CSV data. The layer create options (-lco parameter) allows to prepend the coordinates of Point features to the actual attributes values.

ogr2ogr -f CSV output.csv input.shp -lco GEOMETRY=AS_XY

Note that I omitted the Z-dimension for my example here.
For some reason this results in the following error message:

FAILED: Layer input already exists, and -append not specified.
        Consider using -append, or -overwrite.
ERROR 1: Terminating translation prematurely after failed
translation of layer input (use -skipfailures to skip errors)

I am using GDAL 1.10.0.

Questions:

How can I get this running?
Is there an option to omit the feature attributes: I only want to export the latitude and longitude values?


texts: Flex to java trying to get started on plan?

texts:
I have as suggested recently on this site been "playing"  with arcgis server. For reasons perhaps not obvious to "real" programmers I have built a fairly extensive series of web mapping applications (not real applications) based on flex sample viewer.

It has been very difficult for me to understand the ins and outs of flex but am beginning to get a grip on it.

I stated these are not real applications meaning - when I get an "application working with all the widgets and layers, etc working.

I simply copy that folder structure and rename it to a new application name.
I then edit config.xml (notepad) and default.htm to reflect the new application name.

I don't own any programming software i.e. msvs, flashbuilder, etc.

Because of the power and marketing of apple, I am now in the dilemma of whether to find an x-code programmer to help with the esri IOS application, or switch to Java for all applications, and websites.

One problem I have is even understanding the java terminology. Java, javascript, etc.

Is there an easy to understand resource for Java?

I'm certain there is nothing to convert my flex applications to java.

Has any had experience with what I am going through?


texts:
I'm looking to make a map using Leaflet in R, where the clusters shows the sum of a variable associated with the markers, instead of the number of markers in the area.

For example:
If there are 4 markers in a cluster.
Each marker has a number of dollars associated with that location:
Point 1: 10
Point 2: 15
Point 3: 15
Point 4: 1

The cluster should read 41 instead of 4. Is there a way to do this in leaflet?

Also I have too many data points and dollar amounts to break each point down into 1 voucher for each dollar.


texts: Converting contour lines to terrain dataset?

texts: I have downloaded free DEM from the NET and I generated a contour line with 10 meter for interval. So, I just want to convert the contour lines to LAS point file to create a new terrain dataset. Is this a correct way to create terrain dataset or not, if not what is the best way to create terrain dataset with a free data?


texts: Leaflet proj4leaflet with multiple projections

texts:
I am looking at having both EPSG4326 tiles and EPSG3857(cloudmade) tiles on a single map (but separate layers). I have been looking at the proj4leaflet plugin, and it "appears" to me that this might work. https://github.com/kartena/Proj4Leaflet

Am I reading things correctly?

Also, my 4326 tiles will be coming from a localDB (indexedDB or PouchDB) which means that I probably can't use the proj4 L.Proj.TileLayer.TMS() function, since I need it to get stuff from the DB. (I currently do this via a functional layer, see that leaflet plug-in).

So what about telling leaflet to create a 4326 base map, and then have L.Proj.TileLayer.TMS() layers for the 3857 data? Would that work?


texts: How to intersect a raster subset with a buffered vector layer (points) in QGIS?

texts:
I am a bit new in the GIS and QGIS sphere so maybe my question will look a bit naive, but at the same time it means it should probably be easy for most of you guys ;-)

I work in QGIS. I have 2 layers:

(1) raster: grid representing global land cover / CRS "WGS 84"

(2) vector: a series of point representing factories / CRS "WGS 84"

I would like to select a subset from the grid only pixels with value 11 & 14 and intersect these selected pixels with a buffer of 50km around each factory. The result I would like to save as a new layer (preferably raster).

How can I do that in a simple but correct way?


texts: I have a .csv with a column for ID, latitude, and longitude, which creates points. I also have a .shp file which creates polygons of a parcel. I want to be able to attribute the polygon to the point. The below image shows the points as a blue water droplet and the black lines are the parcels.


texts: String field being populated with a 0 when field calculating

texts:
I am trying to field calculate a text value into a string field and when the process is completed, a 0 is being placed in the field as opposed to my text value. Is there something that I am overlooking? I attempted to search for similar instances but couldn't find anything.

Here is the field properties:

The field calculator value I am attempting to enter:

And the results:


texts:
I am using postgis for my project along with geoserver and openlayers. I give user an html form with drop down menu list of available layers(each layer corresponds to a table in db).The user can select any layer , based on which I am retrieving the fields of that particular from db to insert the values. As soon as the user inputs data and clicks on submit then the data should be inserted into db.

Inserting data into db is a trivial thing as far as you know the order in which to insert into the db. But I have tables with different number of fields and in different order. I want to know how can I insert values into particular table when I don't know the order in which I have to store.

I shall explain with an example:

Table 1 of layer1: id,name,point
Table 2 of layer2: id,polygon,name,area

When user selects layer1 in dropdown menu , the form will provide you id,name,point text fields in that order to insert data. If the user selects layer2 then form will give you id,polygon,name,area text fields in that order.
Suppose say user has selected layer1 then after inserting the values into text fields and submitting , the php file should perform a query
"insert into (id,name,point) values('$_post[id]','$_post[name]','st_geomfromtext('POINT($_post[point])',4326));"

Same way for inserting into layer2 the query should be "insert into (id,polygon,name,area) values('$_post[id]','st_geomfromtext('POINT($_post[point])',4326),'$_post[name]','$_post[area]');"

But how can I know that I have to use only this particular query??? I can know the table name from hidden field.

For now my php file is like this:

$tablename=$_POST[tablename];
if($tablename=='layer1')
{
  perform query1;
}
else if($tablename=='layer2')
{
  perform query2;
}

But this works only if I know the tables already present. Is there anyway to write the php file provided I know only the table name but no idea of table description in db?? (I can get the table description through a query if I want).


texts: Getting a "java.lang.OutOfMemoryError" error while importing raster files from PostGIS to Geoserver

texts:
I am trying to import raster data from PostGIS to GeoServer.

I follow the instructions given on this link.

http://docs.geoserver.org/stable/en/user/tutorials/imagemosaic-jdbc/imagemosaic-jdbc_tutorial.html

I used the gdal_retile to make tiles of my GTiff imagery. I configured xml files and placed them at desire place. Then I used the DDL generation utility which create 4 SQL scripts file, then I ran the SQL scripts. But when I start importing the image tiles, 61 tiles got inserted then an error comes "java.lang.OutOfMemoryError".

There is change in the error...
I am attaching the screenshot, please have a look.


texts: How can I turn a vector layer into a graph G = (V, E)?

texts:
I have a number of rail networks, in the form of shapefiles of the "line" type. I want to turn them into a more abstract graph format, i.e. the kind with vertices and edges, not chart-type graphs. Moreover I want these data to be usable outside my GIS programs, in Python. Basically what I want is to extract something along the lines of the TSPLIB format, except with only vertices and edges. For my immediate purposes, I don't even need weights or anything. Just the topology.

Is there any relatively pain-free way to do this in QGIS or GRASS? I haven't quite lucked out yet.


texts: ArcGIS: not possible to enable data driven pages

texts: I have ArcGIS version 10.5 and I cannot activate the "Enable Data Driven Pages" check box. It does not allow to make any changes. How can I activate this check box?


texts: How do I create a mask where the masked area can be changed by selection?

texts:
I'm working on making a mask in QGIS to have one area(county A) outlined while the other areas(counties) are under a semipermeable layer. I already know how to do this for one selected area.

But my question is now: Is it possible to create some kind of mask where I simply need to select the county of my choice and the rest is covered? And it would make it a lot easier if I could change between the counties for uncovering by selection without creating a mask for every county I want to highlight. Maybe somebody knows how to do this?

I hope my question is quite clear. If not I will try to be more specific.
Thank you for helping :)


texts: Cannot rename output file using standalone script for QGIS

texts:
I would like to rename all output files after my script has finished processing them by adding "(A)" after their file name (eg. Layer.shp -> Layer (A).shp). I received an answer from this post on the commands required to rename files. I put this at the end of the script but I receive the following message when running the script:

  WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'Layer.dbf'

I thought I closed the related processes associated with QGIS but it seems not. The following is a snippet:

import os, sys, glob, shutil
from qgis.core import *
from qgis.gui import QgsMapCanvas
from PyQt4.QtGui import *
from os.path import expanduser
home = expanduser("~")

#   Folder path of the Results for shapefiles
path_dir = home + "\Desktop\Test\\"
path_res = path_dir + "Results\\"

Cellsize = 200
layerPath = path_dir + "Layer.shp"
extent = QgsVectorLayer( layerPath, '', 'ogr' ).extent()

centerx = (extent.xMinimum() + extent.xMaximum()) / 2
centery = (extent.yMinimum() + extent.yMaximum()) / 2
width = extent.xMaximum() - extent.xMinimum()
height = extent.yMaximum() - extent.yMinimum()

def run():

    outputs_0=general.runalg("qgis:creategrid", Cellsize, Cellsize, width, height, centerx, centery, 1, 'EPSG:7405', None)

    #   Set directory and search for all polygon shapefiles
    os.chdir(path_dir + "Polygon Shapefile\\")
    for fname in glob.glob("*.shp"):

    #   Clip .shp files within directory to Grid and save files to Result folder
        outputs_1=general.runalg("qgis:clip", outputs_0['SAVENAME'], fname, path_res  + "/" + fname)

#   Paths of the shapefiles in the Result folder with list comprehension
    output = [shp for shp in glob.glob(path_res + "*.shp")]

run()
QgsApplication.exitQgis()
app.exit()

os.chdir(path_res)
for fname in glob.glob("*.*"):
    name,ex = fname.rsplit(".",1)
    shutil.move(fname,os.path.join(path_res,"{}{}{}".format(name," (A).",ex)))


texts:
R

range(diffRain)
[1] -2.59  7.59

How can I code a color ramp following ways?

red color ramp less than 0.0
blue color ramp greater than 0.0

This is a part of my code.

myTheme <- modifyList(custom.theme(region=brewer.pal(8, 'RdBu')),
                                   list(
                                     strip.background=list(col='gray'),
                                     panel.background=list(col='gray')))

levelplot(diffRain ~ month * year,par.settings=myTheme,panel = myPanel,
        at=pretty(c(minR, maxR), n=8),
        xlab = "month\n San Jose Long-Term(1922-2012) Avg. Monthly Rainfall in inches",
        main = "Monthly rainfall - Long-Term Avg. Monthly Rainfall\n 1922-2012",
        sub =paste(names(MonthAvgRain.Longterm),"\n",MonthAvgRain.Longterm, sep=""))

trellis.focus("legend", side="right", clipp.off=TRUE, highlight=FALSE)
grid.text(expression(inches), 0.2, 0, hjust=0.5, vjust=1)
trellis.unfocus()


texts: R GIS - Error when converting SpatialPointsDataFrame to raster : 'data' must be of vector type, was 'NULL'

texts:
I would like to convert a SpatialPointsDataFrame into a fine raster (5m resolution), using R GIS.

My SpatialPointsDataFrame is made of 593 points, equally distributed along a 8km-grid. Their attributes are monthly amounts of precipitation ("MonthX", X ranging from 1 to 12).

Until now, I have used 'plotKML' package to convert the SpatialPointsDataFrame to a 8km-raster, which I could then disaggregate or resample (using the corresponding functions) to obtain the desired 5m-raster.
But with either possibility, I got the same error message:
    "" Error in matrix(unlist(ini), ncol = 2, byrow = TRUE) :
      'data' must be of vector type, was 'NULL' "

Maybe there's a mistake in my code, but I couldn't find it. Has anyone ever faced a similar problem? If yes, how would you solve it?

Here is my code:

library(rgdal)
data_points<-readOGR("data_points.shp") #importing data
library(plotKML)
raster_ref<-vect2rast.SpatialPoints(data_points, fname="Month1",
cell.size=8000)
#takes first attribute to create a raster framing each point with a 8km-
#large cell
library(raster)
values_ref<-as.matrix(raster_ref)
values_ref[!is.na(values_ref)==TRUE] <- 1 #binary 0/1 raster
final_raster_ref<-raster(ext=extent(raster_ref), ncol=ncol(raster_ref),
nrow=nrow(raster_ref), crs=raster_ref, vals=values_ref)

final_raster_ref<-raster(raster_ref)
plot(final_raster_ref,axes=T)  #projection : Lambert93
plot(data_points,add=T)

#Works fine until here

#Creating a finer, empty raster for function 'resample'
final_raster_ref_5m<-raster(ext=extent(final_raster_ref),
ncol=ncol(final_raster_ref)*1600, nrow=nrow(final_raster_ref)*1600,
crs=final_raster_ref)

#This function should now convert the 8km-raster to a 5m-raster
Precip_5m<-function(month_num, data, final, final_5m) {
  precip_8km<-rasterize(x =
  data[,grep(paste("Month",month_num,sep=""),names(data))[1]],
                    y = final,
                    field = paste("Month",month_num,sep=""))
  precip_5m<-resample(precip_8km, final_5m)
  return(precip_5m)
}
#Applying the function to the points dataset
Month1_5m<-Precip_5m(1,data_points,final_raster_ref,final_raster_ref_5m)


texts: ogr2ogr sql: what is the name of the geometry field?

texts:
I have the following ogrinfo -so output about a shapefile:

Layer name: PREDEFINED
Geometry: Polygon
Feature Count: 58075
Extent: (425995.430000, 336399.500000) - (447356.663000, 359782.760000)
Layer SRS WKT:
PROJCS["OSGB 1936 / British National Grid",
    GEOGCS["OSGB 1936",
        DATUM["OSGB_1936",
            SPHEROID["Airy 1830",6377563.396,299.3249646,
                AUTHORITY["EPSG","7001"]],
            TOWGS84[446.448,-125.157,542.06,0.15,0.247,0.842,-20.489],
            AUTHORITY["EPSG","6277"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.0174532925199433,
            AUTHORITY["EPSG","9122"]],
        AXIS["Latitude",NORTH],
        AXIS["Longitude",EAST],
        AUTHORITY["EPSG","4277"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",49],
    PARAMETER["central_meridian",-2],
    PARAMETER["scale_factor",0.9996012717],
    PARAMETER["false_easting",400000],
    PARAMETER["false_northing",-100000],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AXIS["Easting",EAST],
    AXIS["Northing",NORTH],
    AUTHORITY["EPSG","27700"]]
gml_id: String (0.0) NOT NULL
LABEL: Integer (0.0)

I want to run an ogr2ogr SQL query to get back just the gml_id and the spatial field as WKT. This is what I'm trying:

ogr2ogr -f GeoJSON output.geojson input.gml -sql "select gml_id, geom from PREDEFINED"

But I get ERROR 1: Unrecognized field name geom..

How can I work out what the geometry field name is? I can't see it in the ogrinfo output - is it a standard name?


texts: Can I get rid of the borders around the colour boxes in QGIS Print Composer Legends?

texts:
If you look closely at a legend in the QGIS Print Composer, you'll see that each colour box has a hairline (1 px) border. How can I remove these borders?

By playing around with the settings, I've worked out that this colour matches the font colour setting.

In this case the map background is black, so the only way to get rid of the border is to set the font colour to black.

However, doing this hides the labels. Black text on a black background... bit difficult to read!

I've found a (hacky) way to get around this, by

duplicating the legend (copy/paste)
set its background to transparent
set the font colour to black
set all items' text values to space (it wont let me enter an empty string)
remove any legend title etc.
drag it on top of the original legend, so that the boxes line up

However, this is a bit of a hassle, especially if there are lots of legend entries.

Is there a better way to do this?

EDIT

As of version 2.18 (or maybe earlier) this can now be controlled using a setting in Print Composer. See answer below.


texts: Updating symbology values/fields shown based on location selection in Data Driven Pages?

texts:
I am producing some maps for a client who owns a lot of water and sewer assets. The data supplied by the client has automated symbology which imports when dragging them in from the geodatabase based on unique fields. The number of feature classes is close to 60 and i have gone through and done a select by location based on my Data Driven Pages polygons I've set up, then 'created a layer from selection' for all of these. this helps to improve the performance/speed as it reduces the number of assets down from over 1million to a few thousand just in my areas that need to be mapped (50 x 1:1k maps).

The query I have is that i'm producing a separate 'legend' map which covers all assets that are shown across all the maps. the symbology of each of these feature classes in the table of contents (and therefore legend) doesnt change when i set a definition query or selection query. some of these feature classes are symbolized by up to 3 fields (symbolize by unique features, many fields) and have 20 different symbols, but when i look at the attribute table only 1 of these symbols is present and the remaining 19 are not shown on any of the maps (just as an example of one of them).

Is there a way to automatically update all these feature classes in my table of contents to only show the symbolised features present within my 50 maps?


texts:
I want to add a mssql layer with a SQL query.
It was no problem to do it for PostgreSQL but have somebody an idea of how it is working with the mssql database?
uri = QgsDataSourceUri()
uri.setConnection(host, ort, database, user, password)
uri.setDataSource("","(SELECT distinct  ID FROM Mapdata)","THE_GEOM", "","ID")
vectorlayer = QgsVectorLayer(uri.uri(), "MAP_LAYER", "mssql")
QgsProject.instance().addMapLayer(vectorlayer, True)


texts: PYQGIS 3: Change layout scalebar item to a round scale (e.g. 1:5000)

texts:
I'm loading a layout template to a .qgs project and would like to set up the scale bar so that it has a round numeric scale (e.g. 1:5'000, or 1:25'000 but not 1:12'500). How do I do that?

Here is my piece of code:

import os
import processing
from qgis.core import *
from qgis.gui import *
import qgis.utils
from qgis.PyQt import QtGui
from qgis.PyQt.QtXml import QDomDocument

project = QgsProject.instance()
    project.setCrs( QgsCoordinateReferenceSystem(2056, QgsCoordinateReferenceSystem.EpsgCrsId) )
    project.setFileName(qgis_project_name)

project.write()

# load layout template
composition = QgsPrintLayout(project)
document = QDomDocument()

template_file = open('C:\\my_QGIS\\my_qgis_projects\\ramms_map\\RAMMS_Karte.qpt')
template_content = template_file.read()
template_file.close()
document.setContent(template_content)

composition.loadFromTemplate(document, QgsReadWriteContext())
project.layoutManager().addLayout(composition)

layout = project.layoutManager().layoutByName("RAMMS_Karte_layout_de")

# access the items contained in the layout
sel = layout.itemById("scale") # that's the id of the scalebar item
sel.??? --> here set the numeric number 1: xxxx

# my scalebar is connected to a map ("map1")

EDIT:

# here is the correct piece of code missing

layout = project.layoutManager().layoutByName("RAMMS_Karte_layout_de")

map1 = layout.itemById("map1")

scale_nr = map1.scale() # takes the scale of map1
if (scale_nr % 1000.0 == 0.0) == False: # if not divisible by 1000, it rounds the scale value to the next 1000
    scale_nr = int(round(scale_nr, -3))
map1.setScale(scale_nr) # sets the new scale


texts: What vector output can I use in GeoServer to convey geometries, style and metadata?

texts:
We've been successfully using GeoServer for a few years to serve raster tiles of objects contained in a database. In order to improve the user experience and performance, I'm looking into switching to a vector format. That would allow us to delegate a few things on the client side, like hit detection (for selection) or displaying basic object info without having to call a WFS service.

Because there would be too much objects on the screen on low zoom levels, we use SLD styling to filter out less important objects when the camera is too far from the ground. It's important to me that this filtering is still applied with the vector output, so that we don't have to download 100.000+ objects. And ideally, do that without having to change or add anything to the already existing styles.

So to recap, the requirements for my ideal output format would be :

Vectorial
Can embed features metadata (or at least a unique ID)
Is filtered by SLD style rules (I don't mind applying the rest of the style on the client or server)

Now, I've already had a look at the options available in GeoServer. A promising option was the SVG output, but I didn't see any way to include the objects IDs into the output. KML seems to include medatada and styling, but in my initial tests it did not seemed filtered.

I'm not an expert in GeoServer or GIS formats.

Do you have any pointer on a good solution that I might be missing?

A switch to another server might be an option, but we're hoping we can avoid re-writing all the styling.


texts: How to style features created by DrawFeature control?

texts:
I've been following this tutorial:
http://workshop.pgrouting.org/chapters/geoext_client.html#select-the-start-and-final-destination

It contains an Openlayers.Control.DrawFeatures control defined in the following code sample. You can also see the lines where the author comments "if we want to apply a special style to the start point we should do this here". Problem is: I don't know how to apply a style in this setting and cannot find any examples using DrawFeatures control in this way.

How can I have the start point use a different style than the end point using this DrawFeatures control?

DrawPoints = OpenLayers.Class(OpenLayers.Control.DrawFeature, {

// this control is active by default
autoActivate: true,

initialize: function(layer, options) {
    // only points can be drawn
    var handler = OpenLayers.Handler.Point;
    OpenLayers.Control.DrawFeature.prototype.initialize.apply(
            this, [layer, handler, options]
        );
},

drawFeature: function(geometry) {
    OpenLayers.Control.DrawFeature.prototype.drawFeature.apply(
            this, arguments
        );
    if (this.layer.features.length == 1) {
        // we just draw the startpoint
        // note: if we want to apply a special style to the
        //       start point we should do this here
    } else if (this.layer.features.length == 2) {
        // we just draw the finalpoint
        // note: if we want to apply a special style to the
        //       final point we should do this here

        // we have all what we need; we can deactivate ourself.
        this.deactivate();
    }
}
});


texts: How to Cast geometry to Geography in SQL script in MS SQL Server?

texts:
I have a Table with some spatial Data in MS SQL Server. The datatype of the spatial column is geometry.

I'm trying to get the closest data from an input file using the following query:

DECLARE @g geometry;
SET @g= geometry::STGeomFromText('POINT(-74.19432 43.745)', 4326);

SELECT TOP(1) Shape,  Shape.ToString(), UID, Colour, Shape.STDistance(@g) FROM dbo.roads
WHERE Shape.STDistance(@g) IS NOT NULL
ORDER BY Shape.STDistance(@g);

This query runs successfully, but I want the distance between my input point and the Shape in meters; Right now the value is in Decimal Degrees, since my data is WGS84-lat-long.

To get Distance in Meters, I need to convert the geometry on the fly to Geography

I can't find the syntax to do this Casting in the Select Clause of the Query.

(All the examples That I find, do the casting outside the Actual Select statement. )

How do I temporarily cast the geometry to geography on the fly?


texts: How to use if else statement to create attribute in shapefile using R

texts:
I am working on a if statement within R to populate a new variable called d1 with values from my income field if variable A equals 1, otherwise autofill zeros. I'm having issues with getting it to work however (see error below).

[2025] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[2036] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[2047] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[2058] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[2069] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[2080] FALSE FALSE FALSE FALSE
Warning messages:
1: In if (br10$decile == "1") { :
  the condition has length > 1 and only the first element will be used

if (myshapefile$varA== "1") {
myshapefile$d1 == myshapefile$income
} else if (myshapefile$varA != "1") {
myshapefile$d1 == "0"
}


texts: Converting Multipolygon to Polygon and saving in new table in Oracle Spatial?

texts:
I have a data set with mixed SDO_GTYPE 2007 and SDO_GTYPE 2003, however for the task I am working on only SDO_GTYPE 2003 is allowed for practical reasons.

I was able to extract the polygons in a querie from the multipolygons, however I don't know how to save the polygons in a new table and I couldn't find any helpful information on how to do it.

My code so far:

SELECT SDO_UTIL.EXTRACT_ALL(t1.GEOMETRY, 0)
FROM table t1
WHERE t1.GEOMETRY.SDO_GTYPE = 2007;

CREATE TABLE "TEST"."POLYGON"
   (    "GEOINVFL_N" VARCHAR2(16 CHAR),
    "GEOMETRY" "MDSYS"."SDO_GEOMETRY"
   )

I am working in Oracle 12.1


texts: Polygon to Raster taking longer in script than in ArcMap?

texts:
I have a large dataset that I am working with.  Basically I have a table with 900,000 records that I join to a geodatabase feature layer, then convert that to a raster.

This process takes a total of about 15 minutes if I do it manually in ArcMap.

When I write a python script for it, it takes over 40 minutes.

The table join and creating a feature layer part of my script works fairly quickly (about 2 minutes) but it gets hung up on the convert to raster.

This is the code I am using to convert to raster

arcpy.PolygonToRaster_conversion(polys_fl,"join_table.responses",outputimg,'','',10)

This script is imported into a toolbox.  I'm not running it in an IDE.


texts: Getting user password from ArcSDE using Workspace Properties - python

texts:
Looking at this page for getting Workspace Properties I am wondering if there is a simple way to get a Users password from an existing SDE connection on the users machine?

Using the code sample from the aforementioned link, something like this:

desc = arcpy.Describe(r"C:data\Connection to state.sde")
cp = desc.connectionProperties
print("%-12s %s" % ("  Password:", cp.password))

For clarification this is for a custom Python Script Tool that creates a new SDE connection as part of the code.  Currently I have the user enter their user name and pword in the tool prompt.  If I could however have them simply select an existing database connection on their machine and use the creds from that it would be much simpler and less error prone.

I do not think this presents a security risk because it would only have local application.  A user would be accessing their own info to automate a process on their personal machine.

There are both Oracle and SQL Servers,  I will put logic into the tool that will differentiate between the two.


texts: I am using Open Source Geoserver for showing assets locations which are captured/geotagged on the Google Map with Google Map API using javascript and C#  with SQL Server backend. But when this stored information  in SQL Server is retrieved in GeoServer the locations are then shown somewhere else as where these were captured/geotagged.


texts:
I have GeoJSON that could be either a point or line and I am trying to make the layer red. Here is the code:

function styling(feature) {
    return {
        color: 'red',
    };
}
geoms = new L.GeoJSON(jsdata,{
    style: styling,
    onEachFeature: function(feature, layer) {
    if (feature.properties.Address){
        return layer.bindPopup('Segmentid = ' +feature.properties.SegmentID
        +'
'+
        'Address = ' +feature.properties.Address)
        }
    else if(feature.properties.NodeID){
        return layer.bindPopup('NodeID = ' +feature.properties.NodeID
        +'
'+
        'Street1 = ' +feature.properties.XST1
        +'
'+
        'Street2 = ' +feature.properties.XST2
            )
        }
    else if(feature.properties.SegmentID){
        return layer.bindPopup('SegmentID = ' +feature.properties.SegmentID)
        }
    }
  });
geoms.addTo(map);

There is NO error anywhere and the color is the default blue.


texts: Connect points to lines so moving points moves line?

texts:
I'm trying to create a simple sewage system in ArcMap. I want it so that when I move a node/point, the line is moved as well so it needs to be attached to the point (dynamic link?).
A Point may have have more than one line attached, is this possible to do in ArcMap 10.5.1 (I have Advanced Desktop and Spatial/3D Analyst)?

I've come across Topology as a possible solution. Not sure how to get my two shapefiles/feature classes (point/line) so I can create a topology though.

Edit: Which Ruletype works the best for my problem? I have added the Line and Point feature class to a Topology and using "Add Rule to Topology". I think that is the right approach?


texts:
I am new at using ArcGIS 9.3.1 and am having trouble joining data. I have a shapefile of census tract polygons and a separate file of points that are crimes in Chicago in 2010. The crime points were part of a separate Excel file that I uploaded and converted into a point shapefile.

I now am trying to see how many of the crimes occurred within each census tract but when I try to do "join" it gives me the error: Can't create output feature class.

Why am I getting this?

Is there another way to do this?

I've tried everything I can find on the internet.


texts:
I have created viewer app using opengeo gxp library. I have added some layers in Layers config of gxp viewer. some of which are in overlay group, some in custom group and some in background.

As per gxp documentation the layers added in background group are automatically set as base layers, but here in my case all layers have isBaselayer=false, similarly I want to set the baselayers in my custom group also, please help.

    groups : {
                "default" : "Overlays", // title can be overridden with overlayNodeText
                "admin" : {
                    title : "Administrative Boundary",
                    exclusive : true
                },
                "background" : {
                    title : "Base Layers",
                    exclusive : true
                }
            }

       sources : {
        ol : {
            ptype : "gxp_olsource"
        },
        local : {
            ptype : "gxp_wmscsource",
            url : "/geoserver/wms",
            version : "1.1.1"
        },
        google : {
            ptype : "gxp_googlesource"
        },
        osm : {
            ptype : "gxp_osmsource"
        },
        "mapquest" : {
            ptype : "gxp_mapquestsource"
        }
    }

  {
                source : "local",
                title : " Province Boundary",
                name : "opengeo:admin_division",
                styles : "province",
                opacity : 0.8,
                fixed : true,
                group : "admin",
                visibility : true,
                selected : true,
                isBaseLayer : true
            }, {source : "local",
                title : " District Boundary",
                name : "opengeo:admin_division",
                styles : "district",
                opacity : 0.5,
                fixed : true,
                group : "admin",
                isBaseLayer : true
            }, {
                source : "local",
                title : " Tehsil Boundary",
                name : "opengeo:admin_division",
                styles : "tehsil",
                opacity : 0.5,
                fixed : true,
                group : "admin"
            },

            {
            source : "osm",
            name : "mapnik",
            group : "background",
            isBaseLayer: true
            }


texts: Can ESRI iPad app consume web mapping service?

texts: Can the ESRI app for the iPad consume regular web mapping services, or do I need to publish services for this app as Mobile project services?


texts:
I'm new to gis and having problems with matching reference systems for my two data sources.

I have downloaded some OS Vectormap data which I believe is in 27700..

And I have some longitude and latitudes from the Google maps API which I have inserted into a geometry column in a postgres database using the function ST_GeomFromText('POINT(lat-from-google, long-from-google)', 27700).

When I bring both of these sources into Qgis they do not align. Not as I would expect anyway.

Is there a transformation I should do before insertion into the database?


texts:
I'm trying to import the dateutil.rrule module in the python console of QGIS. That package is installed in my system, i can import it in the python2 console, but inside QGIS i get this error:

from dateutil.rrule import rrule
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/usr/share/qgis/python/qgis/utils.py", line 607, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
ImportError: No module named rrule

I also have this problem with dateutil.easter and dateutil.zoneinfo.

I don't have it with dateutil.parser, datetime.tz and dateutil.relativedelta module

I'm using QGIS 2.18, python 2.7.12, python2-dateutil 2.5.3-1 in archilinux up to date.


texts: Using IDocumentEvents_Event from a .NET 4 assembly within ArcMap

texts:
Are there a known issues when working with events from .NET 4 COM assemblies within ArcMap?

For example, when using IDocumentEvents_Event from a .NET 4 assembly in ArcObjects, the event appears to work properly, but disables the standard right-click context menu behavior in ArcMap.  Changing nothing in the assembly except the target to .NET 3.5 or .NET 2.0 will "restore" the default behavior.  Is this a COM issue, or an ArcObjects issue?  If the latter, is there a potential workaround?


texts: Merging shapefiles based on geometry from different folders using ArcPy?

texts:
I have polygon, line and point shapefiles in a folder and I am trying merge shapefiles based the shape like polygon, line and points.

I have searched and I got the code but it merges only if input files are same type.

My requirement is to merge all files based on the geometry. It means it merge all polygons and after that merge line files and point files.

How can I modify the code below?

import arcpy
import os

arcpy.env.workspace = r"C:\Shapefiles"
fcs_in = arcpy.ListFeatureClasses()
fn_source_field = 'SOURCE_SHP'

for fc in fcs_in:
    print 'fc:', fc

    name = os.path.splitext(fc)[0]
    arcpy.AddField_management(fc, fn_source_field, 'TEXT')

    with arcpy.da.UpdateCursor(fc, fn_source_field) as cur:
        for row in cur:
            row[0] = name
            cur.updateRow(row)

fc_output = r"C:\Shapefiles\Merge_poly.shp"
arcpy.Merge_management(fcs_in, fc_output)


texts: Optimal placement of a shape on a polygon layer based on an attribute

texts:
I am using ArcGIS and I have a layer of polygons that has an attribute. I would like to overlay a circle (or other shapes in theory) of a specified size such that it would encompass the maximum amount of the attribute from the polygons. For example, placing a circle with a diameter of 5 miles over census tracts (that have a population density attribute) so that the circle will encompass the maximum population possible.

I understand that preferably the shape I'm overlaying will be large enough not to get stuck in the middle of a single polygon. I also realize that calculating a maximizing function might not be entirely straightforward as there will be partial overlaps.

I imagine that there is something already out there that does this but I'm not having any luck with searching. I don't know what this sort of analysis would be called either so that doesn't help.

If ArcGIS isn't the appropriate tool for this I'm open to other suggestions. Thanks in advance for any help you can provide!


texts: Geometric difference between equal-area and conformal projection

texts:
For simplification, let's have a source light for a map projection.

I know where to put the source light in order to get an orthographic, stereographic, gnomonic map projection, but I still don't understand, for example, what the difference geometrically (where you put the light and how to project) between the equal-area projection and conformal projection is?

In other words, what and how to make a projection equal-area and the other conformal?


texts: ArcGIS Data Store backup to Azure with configurebackuplocation.bat fails?

texts:
I'm attempting to create a secondary backup location for my ArcGIS Data Store into an Azure Blob container. I've been following the instructions https://enterprise.arcgis.com/en/portal/latest/administer/windows/data-store-utility-reference.htm#ESRI_SECTION1_35FC910709804CC0AA43C44C5B15F810 and https://enterprise.arcgis.com/en/portal/latest/administer/windows/data-store-backups.htm#ESRI_SECTION1_BA5A32CD1AB740EC8C502ED8720ECFE2.

I've tried to run the configurebackuplocation.bat and get the not very useful error

Invalid parameter ((storage location))

PS C:\ArcGIS\DataStore\tools> .\configurebackuplocation --operation register --location type=azure;location=gisdatastorebackup;name=gisdsbackup;username=$usr;password=$pwd
You are attempting to change the backup location of the data store. For a relational data store, existing backups will be copied to the new location and it could take a few moments. For a spatiotemporal big data store, the data store service could be restarted. Please do not interrupt the process once it has started.

Do you wish to continue (Yes or No)?yes

Error encountered: Machine 'https://machinename.guid.PX.INTERNAL.CLOUDAPP.NET:2443/arcgis/datastoreadmin' returned an error. 'Invalid parameter ((storage location)).'

location=gisdatastorebackup : The term 'location=gisdatastorebackup' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the
path is correct and try again.
At line:1 char:70
+ ... on register --location type=azure;location=gisdatastorebackup;name=gi ...
+                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (location=gisdatastorebackup:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

name=gisdsbackup : The term 'name=gisdsbackup' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:98
+ ... ation type=azure;location=gisdatastorebackup;name=gisdsbackup;usernam ...
+                                                  ~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (name=gisdsbackup:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

username=$usr : The term 'username=$usr' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:115
+ ... re;location=gisdatastorebackup;name=gisdsbackup;username=$usr;passwor ...
+                                                     ~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (username=$usr:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

password=$pwd : The term 'password=$pwd' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:129
+ ... ation=gisdatastorebackup;name=gisdsbackup;username=$usr;password=$pwd
+                                                             ~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (password=$pwd:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\ArcGIS\DataStore\tools>

I've ensured that my blob container is ready and my parameters appear ok. I haven't been able to find anything about this error or anyone with the same issue.

Has anyone had a similar experience with this utility?


texts: ArcGIS - Table columns lose formatting when I make a new copy of shapefile (Decimals, Thousands separator, Highlighting)

texts:
When I make a copy of a shapefile or I join two shapefiles and then create a subsequent shapefile, my number type columns (in the attribute table) will default back to numbers with many decimals and no thousands separator. This after I've cleaned up every column the way I like it. I also lose the highlighting of any columns I have a highlight on.

I'm just looking for a way to avoid having to reformat every column if I happen to make a copy of the shapefile. That or is there a way to set a default of 2 decimal places and a thousands separator for the attribute table?

I'm trying my best to get away from shapefiles, but we need it to transfer between multiple programs.

Any ideas would be appreciated.


texts: I am printing my QGIS Print Composer maps in black and white, and I want to make sure that all the different attributes are distinguishable. But I can't select 5 colors that all look distinct from each other in black and white. Is there any way to add like a striped texture or a dotted texture into the QGIS print composer?


texts: What functions and operations are available for CartoCSS?

texts:
Where can I find a reference for the functions available for CartoCSS styling on carto.com? The documentation only gives a few examples and nowhere can I find the set of mathematical operations that can be performed.

#layer {
  marker-width: ramp([my_field], range(5, 25), equal(5));
  marker-fill: #AAA
  marker-fill-opacity: 0.8;
  marker-allow-overlap: true;
}

Can I apply a function (such as log or sqrt) to my_field before making the ramp? Where is the documentation for ramp?


texts: Symbolizing by year, when date column has MM/DD/YYYY?

texts:
I am trying to symbolize an SDE feature, so I can't add any new columns. The date column is formatted as MM/DD/YYYY. I would like to symbolize all 2015s as one symbol, 2016, 2017 as other unique symbols. I figured I could go to unique values and shift click all the relevant rows together and group them, but since month is in front, the sorting just shows all the January months together, so I can't get it to sort nicely before grouping.

Is there a way to symbolize just by date?


texts:
I have rainfall data for more than 50 years in a column. I need to get total rainfall and average rainfall for each year.

How can I do it in R?


texts: Saving RINEX file for follow-up GNSS correction in QField or QuickCapture

texts:
I have a PPM Commander GNSS receiver that can be used to acquire very accurate location information. Using this device to get locations in QField (or similar apps) is fairly simple. However, it only works seamlessly when there is a internet connection so it can stream real-time correction data.
Since I am in a situation where streaming these data is not possible, I need to do post-processing. The data required for post-processing should be collected while working with either QField or QuickCapture where I use forms that are optimized for very efficient data acquisition (which is mandatory for the mission).
However, it is not particularly clear to me how to save the information required for post-processing (it seems this information is usually a RINEX file; I have no experience with post-processing whatsoever, though).