texts: How to ignore GEOS intersection error in PostgreSQL

texts:
Basically I have a query/view which extracts data from many different layers. I would post it here but it actually has almost 2000 lines. Queries go something like
select a.id
(select count(*) from pointtable2 b where st_contains(a.geom,b.geom ) )
(select sum(st_length(st_intersection(a.geometry, r.geometry))) from linetable3 b where st_intersects(a.geom,b.geom ) and st_isvalid(b.geom) is true ),
(select a whole bunch of stuff from several other tables where multitude of conditions..)
from polygontable a
group by a.id, a.geom

In those lines, it does multiple intersections with other tables to extract different values. Problem is that a few days ago, I started running into the following error
SQL Error [XX000]: ERROR: GEOSIntersects: IllegalArgumentException: RobustDeterminant encountered non-finite numbers
ERROR: GEOSIntersects: IllegalArgumentException: RobustDeterminant encountered non-finite numbers

Because of this error, the whole export selection does not work. I was able to pinpoint this down to a line layer. possibly due to the fact that invalid geometries have been added to the table. Problem is that this layer is one of the most important ones so I can't just exclude it. On my where condition I actually have 'WHERE st_valid(geom) is true'
Is there a way to ignore this error and calculate all features that don't return an error or even a way to detect the error?


texts:
I am trying to transform a raster with  gdal.Warp in my own python script.

Example:

In the src raster one pixel presents 5 meters and I am trying to transform it where one pixel would present 6,5 meters. I am reading the gdal python documentations and don't know how to actually do this.

Should I just calculate the new width and height from the ratio of 5/6,5 and use it in the gdal.WarpOptions or is there a parameter that takes the pixel per meter data?

What is the dstSRS parameter ?


texts:
This code is not working and I don't know why?

function getlatlong(b,d){
   return b,d;
}

function buffer(feature){
    var point = {
    type: 'Feature',
    geometry: {
    type: 'Point',
    coordinates: getlatlong(feature.properties.x,feature.properties.y)
  },
    properties: {}
};
    var unit = 'meters';
    var buffered = turf.buffer(point, 10, unit);
    var result = turf.featurecollection([buffered, point]);

    L.geoJson(buffered).addTo(map);


texts: Using SVG symbols in QGIS 3 that are not saved locally

texts:
I am trying to design a QGIS (3.10.7) project which would enable users to work from home and not bind them to a specific computer at their workplace. I am using the PostgreSQL/PostGIS database to save data, and symbology is set beforehand in the empty project that the users will download. I found a problem regarding symbology when using this approach. I need to use SVG images as symbols for some layer and I would like to prevent downloading the whole library of them to local computers of the users, as there are around 400 unique images.
Is there a way that QGIS could get the images from my server?
I currently have them saved on the FTP server and they are publicly accessible, but I didn't find a way to load them in QGIS. I also thought about uploading them in the PostgreSQL database, but I am afraid it would be too much costly for the DB. Has anyone solved this or is local saving the only way?


texts: Maximum character length in Well Known Text for QGIS

texts: Is there a maximum limit of characters in an Well Known Text (WKT) that allowed by QGIS Desktop?


texts:
Is there a way to clone a table from another user?

The only way I see is exporting the dataset and importing again into your own account.
This would be a nice feature for teaching, i.e., a simple means for sharing data with your students. It is standard in online coding platforms such as JS Bin...


texts:
In QGIS I have a polygonal shape on the screen with an outline and fill
But no layers are visible
All layers are actually Hidden
The Identify Features doesn't recognise it

How to find where it is?
How can I remove it?


texts: Seeking Norwegian waterlines and water bodies shapefile?

texts:
I am searching for a shapefile containing waterbodies and waterlines (rivers, etc.) in Norway, ideally at scale 1:50 000.

I have found a great resource of topographic map here: https://kartkatalog.geonorge.no/metadata/kartverket/n50-kartdata/ea192681-d039-42ec-b1bc-f3ce04c189ac but my downloaded data contain a raster of topo map and vectors, which do not contain river lines neither river bodies.

I have also found a WMS service for topo data: https://openwms.statkart.no/skwms1/wms.topo4.graatone? which contain the rivers ("Elver", "Vannkontur"), but I can not modify the style of those data neither simply overlay it on my map.

I have downloaded multiple datasets such as http://www.diva-gis.org/datadown but those show just the most important rivers, not the smaller rivers at the 1:50000 scale.

How can I access the river and water bodies data from Norway?

My study area is near Østfold. Unfortunately, I am not a Norwegian speaker.


texts: Arcgis basemap with proxy.ashx not loading correctly

texts:
I have a .Net application using the JavaScript API to draw a map. I use the proxy.ashx file to proxy requests to secure map services (dynamic tokens), configured in proxy.config. I added an entry into proxy.config for ArcGIS Online:-

<serverUrl url="http://services.arcgisonline.com/" matchAll="true" />

My JavaScript is as follows:-

    esri.config.defaults.io.alwaysUseProxy = true;
    esri.config.defaults.io.proxyUrl = "/proxy.ashx";

    map = new esri.Map("map", {
        extent: new Extent({
            xmin:174.5, ymin:-39, xmax:174.7, ymax:-38.8,
            spatialReference:{wkid:4326}
        }),
        basemap: "topo"
    });

If I exclude the basemap, my map draws as expected but if I include the basemap (as above), the basemap is drawn partially and I get an infinite loop of null requests occurring:

    GET /proxy.ashx?undefined/tile/NaN/NaN/NaN?blankTile=false HTTP/1.1

I have stripped out all other code to eliminate that as a cause. If I comment out the two lines of JavaScript to use the proxy the basemap works perfectly so the problem has something to do with my proxy.config and/or the proxy.ashx file. Possibly I have an older version old proxy.ashx.

Has anyone seen this error before, or point me in the right direction to get a basemap working with the proxy configuration? I am using JavaScript API 3.8


texts: Google Earth hide geometry except for a small area

texts: In a Google Earth tour, I only want to show a specific small area, that is, I want to hide (not render) all terrain outside of this area. If such hiding is impossible, can I use a black "image overlay" with a transparent "hole" in it, to "drape over" most of the terrain except for a small area?


texts: Currently I didn't find World winkel II or ESRI : 54019 coordinate system support in qgis. One of our client using this.. Can any one tell me a solution to load shape files,which are using his coordinate system. I didn't find .proj4 file for this.


texts: Creating DEM from Point Data using QGIS?

texts:
My boss gave me a small 3D-point-shapefile and asked me to make an DEM from it, which I should put together with an older DEM of the same site, which was made with Surfer.

I created a raster-layer from the shapefile and used the contour-tool to create level-contours. Unfortunately they seem to be lines instead of polygons. When I use the tool line-to-polygon some of the levels disappear. I am sure there is a way to create a DEM from point-data, but I have no idea what I am doing wrong.

I use QGIS Valmiera.


texts:
I have a question about processing MOD35 cloud mask image.

I worked reprojection on MOD35 cloud mask image using MODIS Swath Tool.

The processed results of MOD35 cloud mask are consist of 6 band images (band0, band1, band2, band3, band4, band5).

And each band images is 255 bits.

I know that MOD35 cloud mask images is 48bit having a lot of information about clouds(1-2 : unobstructed FOV donfidence flag, 5bit : snow/ Ice background Flag, 9bit : thin cirrus dected ).

what are the meaning of the band 0 to band 6 of processed result of MOD35 ?

Is it right that create 48 bit image using all bands (band 0 to band 6)?

I want to extract information from MOD35 cloud mask about  (1-2 : unobstructed FOV donfidence flag, 5bit : snow/ Ice background Flag, 9bit : thin cirrus dected).

How should handle this image?


texts: Adding attributes contained in JSON data to OpenLayers popup?

texts:
I am working on a website using jQuery, Javascript, and OpenLayers.  I am adding markers to an OpenLayers Vector layer using the following code:

var pointLayer = new OpenLayers.Layer.Vector("POI Markers", {projection: "EPSG:4326"});
$.getJSON('json/DATA.json', function(data) {
  $.each(data.transmitters, function() {
    var pointFeatures = [];
    var px = this.longitude;
    var py = this.latitude;
    // Create a lonlat instance and transform it to the map projection.
    var lonlat = new OpenLayers.LonLat(px, py);
    lonlat.transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:900913"));

    var pointGeometry = new OpenLayers.Geometry.Point(lonlat.lon, lonlat.lat);
    var pointFeature = new OpenLayers.Feature.Vector(pointGeometry, null, {
        pointRadius: 16,
        fillOpacity: 0.7,
        externalGraphic: 'marker.png',
    });

    pointFeatures.push(pointFeature);
    pointLayer.addFeatures(pointFeatures);
  });
});

I am using the following code to select markers and create popups:

 var selectControl = new OpenLayers.Control.SelectFeature(pointLayer, {
  hover: true,
  onSelect: function(feature) {
    var layer = feature.layer;
    feature.style.fillOpacity = 1;
    feature.style.pointRadius = 20;
    layer.drawFeature(feature);

        var content = "
Feature:
" + feature.id +
            "

Location:
" + feature.geometry +"
";

        var popup = new OpenLayers.Popup.FramedCloud(
        feature.id + "_popup",
        feature.geometry.getBounds().getCenterLonLat(),
        new OpenLayers.Size(250, 100),
        content,
        null,
        false,
        null);
        feature.popup = popup;
        map.addPopup(popup);
    },
    onUnselect: function(feature) {
        var layer = feature.layer;
        feature.style.fillOpacity = 0.7;
        feature.style.pointRadius = 16;
        feature.renderIntent = null;
        layer.drawFeature(feature);

        map.removePopup(feature.popup);
    }
});
map.addControl(selectControl);
selectControl.activate();

As you can see, the popup contains information regarding the feature id and geometry.  What I would like to do is add information that is contained inside the DATA.json file referenced in the first code block to the corresponding popup.

I am using a large JSON file.  The following is a sample:

"LOCATION_A": {
      "latitude": 10.2070,
      "longitude": 25.3215,
      "altitude": 1.2,
      "status": "CLOSED",
      "serverAddress": "192.168.0.1"
 }

I would like to add the latitude, longitude and status information to the corresponding popup so when the user selects a popup, they view this information.

In addition, it would be useful to change the "externalGraphic" file to reflect the status of each LOCATION.  Continuing to use the above JSON file, if a POI were closed, the "externalGraphic" file should be one PNG file, while if the POI were open, it should be another.

I am using jQuery in this project.


texts: Seeking Moderate to High Resolution Forest Fire Before and After Images

texts:
I'm trying to search through the moderate to high-resolution satellite image data sets for imaging that shows forests both before and after a forest fire in order to assess the burn severity and the spatial boundaries of the fire. I'm confident that the data I'm looking for exists in some of the Earth Engine data sets in the data catalog (https://developers.google.com/earth-engine/datasets), but each data set is so large that I don't know how to go about finding the slices of them that would work for this project.
Is there anyone reading this familiar with some portion of one of these datasets that satisfies this description or who could offer guidance on how to efficiently search the datasets for what I'm looking for?
I have never worked with GIS data before.


texts:
The image shows as example a small loop by car, recorded by two Garmin Dakota 10 devices. It seems both devices have had difficulties caused by the surrounding buildings, the "blue one" seemingly had better reception. A lot of the recorded coordinates seem to be more calculated/interpolated than measured.

We want to match the track to the (OSM) road network, and want to calculate driving speed. This proves difficult because of the scatter and interpolation. We would prefer missing over wrong positions.

Are other devices better suited for this task?

Additional info: One device was hold in the hand, the other one was laying by the window. WAAS off on both devices. This is in the middle of a longer tour, so the devices are already recording for more than an hour. We are "guest" on the cars, so mounting an external antenna is not an option.


texts:
I have seen several videos of being able to do stacked bars as diagrams to represent atrributes in QGIS (e.g. https://www.youtube.com/watch?v=Ras5y6TpECk&ab_channel=WiseGIS) However I do not see stacked bars as an option on my version of QGIS (3.10.6).
Which version was this added/removed?


texts: Getting maximum value from multiple values output (list of numbers) using Calculate Value in ModelBuilder?

texts:
I have an output from a sub model that iterates through feature classes, each with a row count. The row counts are passed to a collect values, which is a model parameter and is used outside the sub model.

How can i use simple code in a "calculate value" tool to get the maximum value from this list of numbers. I wish to then use this as a precondition to subsequent analysis so that if the sub model does not produce results then the subsequent analysis will not run.

This is similar to Exporting data from Collect Values output in ArcGIS ModelBuilder? that wished to use the actual list of numbers. The answer suggested an export to .csv file.

I only need to use a simple output so that I can use it as a pre condition on subsequent analysis. I have tried to calculate the Max(list), but it has not worked.


texts: Creating Branching Python Script, Based on Whether Feature Classes Exists or Not?

texts:
What I would like to do is create a script that checks the existence of a feature class and, depending whether it does or not does, skip to different process. This would need to be implemented in Modelbuilder so if there is a tool I have not utilized (instead of a script), point me in the right direction!

I am a complete noob when it comes to Python, so the simpler the better!


texts: Second Page for Legend in ArcGIS for Desktop?

texts: I'm looking for a way to have a second page in the layout view in ArcGIS 10.3. The map I'm making fills the whole page and I'd like to make the legend go onto a second page. Other solutions are welcome if it's not possible.


texts: How to enumerate join values with ArcGIS?

texts:
I have two shape files (e.g. postal code areas and cities) which I want to join based on an id that both shape files have in common (the id would be the city name in this example). Joining the two tables is not the problem (via Join and selecting the city name as field on which the join is based).

But what I really want is an enumeration of all the postal codes of a city - if I join them and take cities with postal codes, every city will get one random postal code that has the same city name as the city, but I want all of them as comma-separated list as new attribute in the cities shape file).

Is there a way to do that?

Example table postal codes:

Postal Code | City
          0 | A-Town
          1 | A-Town
          2 | A-Town
          3 | B-Town
          4 | B-Town
          5 | C-Town

Example cities table:

City Name
   A-Town
   B-Town
   C-Town

Desired outcome table:

City Name | Postal codes
   A-Town | 0, 1, 2
   B-Town | 3, 4
   C-Town | 5


texts: How to find overlapping points and add their name value to each other?

texts:
I'm working on a point-layer where points represent the start and end point of lines (streets). Since some streets are joined to each other at the startpoints/endpoints (because they're next to each other) some points share the same XY-coordinates as they overlap each other.

I would like to find these points and add to a new/empty column the overlapping points' "name" (or "id") value.

Is this possible with an expression in the field calculator? I suppose I should use $x_at(0)/(-1) and $y_at(0)/(-1) but I can't find out that which expression helps finding overlapping features.


texts: Merge external table with GIS SpatialLinesDataFrame file in R for attribute table

texts:
I have a SpatialLinesDataFrame file named "Sldf" which lacks attributes for each line (see table of sample data below). I have a separate data.frame (from a .csv) named "fsub" with attributes that I would like to merge to the SpatialLinesDataFrame file.

The "DataID" column in the fsub data.frame and the Slot "Id" number in the SpatialLinesDataFrame link the two. See screenshot below for where the unique identifier appears in the SpatialLinesDataFrame file.

How would I complete this operation? I tried the basic merge function but I don't think that works with spatial files.

Sample data "fsub" data.frame
DataID  source  target  value
    30  Dis1    France  5
    35  Dis1    USA     10
    52  Dis1    Albania 15
    80  Dis1    Austria 20
    121 Dis2    Mexico  506


texts: Conditional formatting of grid cells based on specifict attribute

texts:
I'm using QGIS.

I have a 29x30km grid. Every cell of the grid has its ID and every cell of the grid has an attribute "Population" ranged from 0 to 30000.

What I would like to do, is to get some kind of heat map of the grid, eg. 30000 population cell is dark red, 100 population cell is light yellow.

The HeatMap plugin does not work (or I'm using it wrong), because AFAIK to get HeatMap from this plugin I'd have to convert my atrribute to eg. 30000 points in this cell.


texts: When using the Google maps geocoding API, how to handle cases where an address returns nothing?

texts:
I have a list of addresses that I want to geocode. While the Gmaps geocoding API does geocode most of them successfully, there are a few addresses for which it returns nothing.
How do I handle these?
I tried removing words one by one from the beginning of the address until it is able to return a result, but I fear this sometimes leads to wrong geocoding (i.e., it may, in some cases, interpret the modified address as belonging to another region or country).
for i in range(len(data)):
    if not((a<data['Lat'][i]<b) or (c<data['Lon'][i]<d)): # desired valid coordinate range
        place = data['ADDRESS'][i]
        while True: # repeat the loop until a break is reached
            try:
                lat, lon, res = gmaps_geoencoder(place) # this function returns the latitude, longitude, and the jason string from the geocoding API
            except:
                place = place.split(' ', 1)[1] # if it can't find anything, remove the first word

            if (a<lat<b or c<lon<d): # double-checking the desired coordinate range to make sure its correct
                break
        data['Lat'][i] = lat
        data['Lon'][i] = lon
        data['Result'][i] = res

After doing this, from a preliminary glance at the results, I would say around 15-20% of the locations that weren't geocoded the first time are wrongly geocoded now.
I thought the geocoding API handles this by default as it contains parameters like partial_match and formatted_address, which appears in many of my successfully geocoded results. But why is it not able to handle some addresses then? When I tried copy-pasting a few of those addresses randomly in maps.google.com, it does return the location for a filtered version of the address. This leads me to wonder if the geocoding API is not the same as the one used by the Google maps website.
Here are 2 addresses for which the API (as well maps.google.com) does not return anything:
CBNC CRH 11B BISMUTH ST RTW TOWNSITE RIOTUBA BATARAZA PALAWAN PHILIPPINES
CBNC LRH 54D RTN COMPOUND RIOTUBA BATARAZA PALAWAN PHILIPPINES


texts: QGIS problem using join by location algorithm

texts:
I am new to QGIS.

I have a problem when i use the algorithm "Join by location" in my graphical modeler, it returns me the "uknown error". I think the problem is that the shape i´m using to join is empty, i mean it has not elements in it. But, i need to keep it empty because the algorithm i´m creating can be used in differents situation, maybe  in another study, it will has some elements.

If the shape doesn´t have features, i would want that the model just skip that step. I´m not good at writing in Python.

How do I solve this to adapt the process for every situation?

I don´t post all the model because is extensive, but the other parts are the same as the one in the picture.


texts: Google Earth Engine uploading table asset meets "invalid shapefile supporting file“

texts:
I am trying to upload a series of data coordinates to Google Earth Engine.

First, I used ArcGIS and converted the Excel data to shapefile and I got eight files.

However, when I am trying to upload them, a mistake came out like the first picture.

  An invalid shapefile supporting file has been provided. The valid
  extensions are: ".shx", ".dbf", ".cpg", ".fix", ".prj", ".qix",
  ".sbn", ".shp.xml".

Then as the tip showed, I deleted the .shp file. But it did not work, either. The tip told me that .shp is demanded. What am I supposed to do?


texts: Error generating chart because computed image is too large

texts:
I want to export a graph of type ui.chart.image.series in the GEE in CSV format.

This graphic is built into the browser after two different collections of images (one I named "Collection" and the other one from "imageCollection") are processed by a geospatial library (LANDTREND) after a click

Map.onClick(function(lonlat){

  var pixel = samplesVegPrimaCinquenta

  var collection = Collection
    .select(["NDVI_to_ajust"], ["ORIGINAL LANDSAT"])
    .merge(imageCollection.select(["NDVI"], ["LTGEE RESULT-INDEX NDVI"])
    )
    var options = {
        title : "Fit RMSE: " //+ (Math.round(collection * 100) / 100).toString()
      };

    var graph = (
    ui.Chart.image.series(
      collection,
      pixel,
      ee.Reducer.mean(), 30
      )
    .setOptions(options)
  );

      print(graph)

It is through the use of this library that the graph is so heavy to be plotted in the browser and therefore, I can not just click the "download in CSV" button available.

Just click on a point that the chart should be plotted, but an error occurs "Error generating chart: Computed image is too large". Here's the link .


texts: For each row of GPS coordinates, get value from nearest road to coordinates and copy to said row using PostGIS?

texts:
I have two tables in my database; one contains a set of GPS coordinates of a car which have been converted to geom, and another containing Open Street Map road data, including the speed limit for most roads.

For each row of car GPS coordinates, I want to get the speed limit of the road the car is driving on, and add it to said row.

On other words, I am trying to go from this:

Table 1 (gps data; before)

| timestamp    | speed | lat     | lon      | geom      |
| ------------ | ----- | ------- | -------- | --------- |
| 180412235750 | 34.3  | 64.1238 | -21.8217 | 010100... |
| 180412235745 | 26.7  | 64.1331 | -21.8971 | 010100... |

+

Table 2 (osm data)

| gid | osm_id  | ... | maxspeed | ... | geom      |
| --- | ------- | --- | -------- | --- | --------- |
| 1   | 2818432 | ... | 90       | ... | 010500... |
| 2   | 2818434 | ... | 0        | ... | 010500... |

To this: (notice the maxspeed column)

Table 1 (gps data; after)

| timestamp    | speed | lat     | lon      | geom      | maxspeed |
| ------------ | ----- | ------- | -------- | --------- | -------- |
| 180412235750 | 34.3  | 64.1238 | -21.8217 | 010100... | 60       |
| 180412235745 | 26.7  | 64.1331 | -21.8971 | 010100... | 50       |

I have tried various nearest–neighbour quaries from this website and others with limited success.

Edit: Prior attempts at an SQL solution:

My most successful attemp has been the following query:

SELECT r.maxspeed
FROM roads r, buses b
WHERE ST_DWithin(b.geom, r.geom, 8)
ORDER BY ST_Distance(r.geom, b.geom);

Until you realize that it seems to iterate over every road and get the nearest GPS coordinates, instead of the other way around.

It also does not tackle the problem of storing the value to the GPS coordinate row, which I have not been able to find how to do without some sort of ID.


texts:
Does TileStache support serving vector MBTiles?

I've looked at https://github.com/TileStache/TileStache/blob/master/TileStache/MBTiles.py , but I can't tell from this...


texts: How to make symbol decrease at the ends in QGIS

texts:
Is there a way to make symbol size decrease/increase at the ends of line like in OCAD?

In the first line the brown dot is decreased near to the end of line.
In the second line the symbol is brown rectangle. It is spaced very tightly and decreased at the end, producing effect of thinned line.


texts: GeoServer: Link meta data to raster image?

texts:
I want to use the OpenGeo Suite to publish different sets of raster imagery with associated data. Doing this with vectorial data works fine:

Setup the data base in postGIS: import the vectorial data, create tables containing data describing the objects.
Setup a data store in GeoServer: make a connection to the data base.
Setup a layer in GeoServer: combine vectorial data and attributes with a SQL view.

After that I understood that I can easily access attributes via GetFeature requests to a WFS. However, the same with raster data instead of vectorial data seems not to work like that. One can import raster data from postGIS (via the ImageMosaicJDBC plugin) but I see no means to link it in the same way as above.

I'm new to web mapping, so: Is it my ignorance of the matter or the lack of a feature in GeoServer?


texts: Apply Orbit File in snap for PALSAR 2 data

texts: I am using snap software for PALSAR 2 data. Thinking of orbit correction using the Apply Orbit File in the radar tool. But in the processing parameter, under the Orbit State Vectors we do not have any such option.How do i correct the orbital errors using SNAP only.


texts: Setting flow to road network using Utility Network Analyst of ArcGIS Desktop?

texts:
I'm editing the freeway network of the Lisbon Metropolitan Area for 2013. Currently, I am trying to establish the flows of the freeways and their accesses using the Utility Network Analyst but I can't do it.
The button 'Set Flow Direction' (brown color on picture below) is OFF despite the Utility Network Analyst is ON (blue trace) and the editor ON (green trace).

Important to say I used the tool 'Set Flow Direction' from Data Managements Tools to give me a pre-defined flow. In this case is the inversus of digitalization. Either way, if I don't set before all the network will be with undetermined flows which I also cannot change.

What can I do to set the flows?


texts: Selecting Features located in extruded surface using ArcScene?

texts:
I have a set of total station points that have elevation values for different soil Horizons across a 40x10 meter piece of land.

I have created a TIN surface for each Soil Horizon and then used the "Extrude Between" tool to fill in the gaps between the different soil surfaces (ultimately giving me an enclosed block for each soil surface, one on top of the other and so on).

I also have points that were shot in across the surface with elevation values.

I can display both the soil surfaces and points correctly.

I want to select all the points that fall inside each soil horizon, much like "select by location" in 2d GIS.

Is there a way to select features that are located in an extruded surface?


texts:
I am currently using QGIS version 2.16.1.

How can I make a customized symbol?


texts: No 'Access-Control-Allow-Origin' header is present on the requested resource. Using Geoserver + Openlayers

texts:
This is my code to open a WFS layer from geoserver:

    <!DOCTYPE html>
<html lang='en'>
<head>
 <meta charset='utf-8' />
 <title>My OpenLayers Map</title>
 <script type='text/javascript' src='OpenLayers.js'></script>
 <script type='text/javascript'>

 //Variável map
 var map;

 //Função a ser chamada para criar o mapa na leitura da página
 function init() {

 // A classe Map espera dois argumentos "map_element" que o ID do elemento HTLML geralmente uma DIV e opções de mapa {key:value}
 map = new OpenLayers.Map('map_element', {});

 //Camada WFS
 var wfs_layer = new OpenLayers.Layer.Vector(
    "Routes",
    {
        strategies: [new OpenLayers.Strategy.Fixed()]
        ,projection: new OpenLayers.Projection ("EPSG:900913")
        ,protocol: new OpenLayers.Protocol.WFS({

            version:"1.1.0",
            url:"http://localhost:8080/geoserver/wfs",
            featurePrefix: 'spatial',
            featureType: "spatial:onibus",
            featureNS:"http://spatial/application/webGIS",
            geometryName: "geom"
        })
    }

    );

 //Adicionar as camadas ao mapa
 map.addLayers([
    wfs_layer]);

 //Camada de controle que vai mostrar as camadas no mapa
 map.addControl(new OpenLayers.Control.LayerSwitcher({}));

 //Verifica se o mapa tem um ponto central e o extende a sua extensão máxima
 if(!map.getCenter()){
 map.zoomToMaxExtent();

 }
 }

 </script>
</head>

<body onload='init();'> <!-- Chama a função js init() -->

<!--Elemento HTML onde o mapa é exibido -->
 <div id='map_element' style='width: 1000px; height: 900px;'>
 </div>

</body>
</html>

The page is in www folder of geoserver, when I run it gives the error:

XMLHttpRequest cannot load http://localhost:8080/geoserver/wfs. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.

I searched but did not quite understand because I am excutando locally.
Can someone explain to me more clearly why this error?
How should I solve it?

This error only occurs in Chrome.
Firefox will not appear on the map, but the console is:

    file:///C:/Program%20Files/GeoServer%202.4.5/data_dir/www/OpenLayers.js
file:///C:/Program%20Files/GeoServer%202.4.5/data_dir/www/theme/default/style.css
file:///C:/Program%20Files/GeoServer%202.4.5/data_dir/www/img/layer-switcher-maximize.png
file:///C:/Program%20Files/GeoServer%202.4.5/data_dir/www/img/layer-switcher-minimize.png
OPTIONS http://localhost:8080/geoserver/wfs


texts: Raster Reclassify fails upon Completion in ArcGIS

texts:
When attempting to reclassify a raster in a student edition of ArcInfo 10, the program crashes without an error upon reaching 100%. The reclassified raster is written, but with no spatial info. I've got Spatial Analyst and the latest service pack. I suspected it might be a RAM issue, so I split the raster, but I'm having the same problem even with the much smaller dataset.

Edit: The plot thickens - I copied the file and mxd to a different location on the desktop, and now the reclassify works! Could having the original file located inside too many folders possibly have caused the problem?


texts: Locating which geographic polygons intersect a point

texts:
I am working on a real estate website, and each property has a latitude and longitude.

We also have a database of schools (among other things), and each school has a list of geographic points that relate to the schools geographic boundaries. We store this information currently in a large string formatted to the google maps array standard (so it can be read and injected directly in to a google maps object in HTML).

With a given property (lat/lng), how can we easily find which schools are available to that property?

What I am looking for here is the best way to design our database going forward to make this common lookup easy and fast. To be honest even given all the points as individual objects in C# I have no idea how to determine if a point falls within its area.


texts:
I have a problem represented in that when I make an iteration with For loop, it does not return many results as it is specified, and instead it just return one value. I am using a simple model builder with for iterator and buffer of 100 to 400 with 100 increment.

What do I do to get the specific results?


texts: arcpy.FeatureClassToFeatureClass_conversion() gives ERROR 000732: Output Location: Dataset ... does not exist or is not supported?

texts:
I'm trying to write a script to convert CSV to Feature Class (overwriting if pre-existing).

Unfortunately my version of Arc (10.2.2) does not have "XYTableToPoint()" so I needed to find another way.

I employed the suggestion made by "GISI" in response to this question: "Event layer to feature class - fastest method?", but here is the error I'm getting:

Traceback (most recent call last):
  File "Q:\scripts\CSVtoASMADPointFeatureClass.py", line 23, in <module>
    arcpy.FeatureClassToFeatureClass_conversion(Temp_Layer, Target_GDB, Target_FC_name, "", "" , "")
  File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\conversion.py", line 1675, in FeatureClassToFeatureClass
    raise e
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000732: Output Location: Dataset Q:\Data\Stations.gdb\Stations does not exist or is not supported
Failed to execute (FeatureClassToFeatureClass).

Apparently the problem is with my parameters.

When I read ESRI's documentation on FeatureClasstoFeatureClass I saw their first example using only the first 3 paramaters, so I figured I was fine to just use the first 3 as well (last 3 optional).

For example, I didn't think I should need the 5th parameter (Field Mappings) because I want all the fields exactly as they are in the original CSV.

What is wrong with the Parameters as used in the "FeatureClassToFeatureClass" Arcpy Tool below?

import arcpy
Source_CSV = r"\\int.ec\Data\Stations.csv"
Target_FC = r"Q:\Data\Stations.gdb\Stations"
Description = arcpy.Describe(Target_FC)
Target_FC_name = Description.name
Target_GDB = Description.catalogPath
Temp_Layer = "Temp_Layer"
SR = arcpy.Describe(Target_FC).spatialReference
arcpy.MakeXYEventLayer_management(Source_CSV, "Lng", "Lat", Temp_Layer, SR, "")
arcpy.FeatureClassToFeatureClass_conversion(Temp_Layer, Target_GDB, Target_FC_name, "", "", "")


texts: Problem connecting local POSTGIS in QGIS

texts:
I'm trying to connect to local POSTGIS database using QGIS.
I'm using the POSTGIS Tutorial form Buondless (rif. http://postgis.net/workshops/postgis-intro/index.html).

The context is the following:

Windows 7
"POSTGIS="2.1.1 r12113" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel.
  4.8.0, 6 March 2012" GDAL="GDAL 1.10.1, released 2013/08/26" LIBXML="2.7.8" LIBJSON="UNKNOWN" RASTER"
QGIS 2.0.1

I can define the db, adding data from a shapefile and all seems work fine when I'm in pgAdmin.

When I Try to connect the postgis database from QGIS no connection works.

Here you are the configuration I'm using

The error is a generic "Check parameter and retry".

I've noted that if I don't set username and password the error is

FATAL: role "520" does not exist.

520 is my network username in my Company. ??????

Suggestions?


texts: Need to convert coord_dimension from 4 to 2. File contains 2D polygons

texts:
I am working with PostGIS Bundle 2.5 in PostgreSQL 11. I loaded a MultiPolygon file from a geodatbase and I need to append the geometry table to an existing geometry table. However, the coordinate dimensions of the new table is set to 4 (even though it only contains 2D polygons) and the coordinate dimensions of the original table is 2, so I get "ERROR: Geometry has Z dimension but column does not".

How can I reset the coordinate dimensions of the geometry table from 4 to 2?


texts: Selecting feature and getting its fields by mouse click using Python Addin in ArcGIS?

texts:
I'm building a python addin tool in arcgis and I would like to click a feature, say a polygon on the map, and get the polygon's attributes,i.e. ID=3,NAME = "CITY3"...It's similar as the arcmap tool Identify without a pop-up window.

I can only think of a way by getting the mouse click XY first, and do a select by location query to get the feature.I'm wondering is there a better way of doing this?

Or is it possible to grab the information from Identify tool using python addins?


texts: Identifying clusters in vector point data using QGIS?

texts:
I have a vector dataset of rural broadband data-points (how fast, etc.) and I'd like to explore if there are clusters of points with similar characteristics, and to plot polygons encompassing them.

For example, I may have 45,000 points in a single PostGIS dataset distributed over a landscape.  I want to identify clusters which lay within x km of each other and where the speed is below y kbps, and to produce convex hulls for each qualifying cluster.

Is there a simple way of doing this in QGIS, for example?


texts: Generating raster from isolines using SAGA or ArcGIS?

texts:
I have a vector dataset of mean annual precipitation polylines, and I would like to generate a raster from them. I'm not sure the best way to go about it.

ArcGIS has the Polyline to Raster tool but from reading its help file I get the impression it's not really designed to do what I need it to do. Obviously some kind of interpolation is required.

I am hoping that SAGA-GIS might have a useful module. Either that or I guess I could convert the lines to points and then krige them.


texts: Extract raster values to points (1 per cell) for R using ArcMap?

texts:
I have created several raster layers within ArcMap that I wish to extract values from in order to analyse within R.

However, I'm keen to avoid pseudo replication of my species presence data and therefore only wish to have one point value per cell.

Is there a way to do this?


texts: Reducing number of points, keeping most recent data within given distance, using QGIS?

texts:
I have a HUGE dataset of points that were collected along a route. The data may change daily, and the most recent data is the most important. What I would like to do is take only 1 point from a given radius (say 30ft). If there are 5 pts within 30ft of eachother, then I want to keep the one with the most recent date.

What is the best way to do this across the entire dataset?

I was thinking small buffers, then a selection of if they overlap... I don't know... I'm using latest stable QGIS, but could give GRASS a shot if there's a way in there.

As an example, I've attached a screenshot that has the dense cluster of points, and I would like to reduce so that there is approx. one pt every 30ft. This shapefile is approx. 1.1gB.


texts:
I have a question about the quantile classification in QGIS (2.6 and master, windows or linux).

I used the points in polygon fonction. I have 100 polygons.

In the attributes of my 100 polygon I get the number of points for each polygon.

How can I reclassify this layer into ten classes of equal numbers of points?

If I use the quantile classification, QGIS divide the number of polygon in ten and colour each of them in a colour. It does not take into account of the numbers of points in each polygon.

My goal is to measure the grouping of points and to be able to say, this 3 polygons group 10 % of the total size.

these 10 polygons group 50 % of the totale size ...etc

Is there a method to to this whith QGIS ?


texts:
I have vector layer on QGIS 3.8 that contains different polygons, each one is labeled by its' name. I have used the label toolbar to move the labels, and it worked for one of the layers I have, but then on the next ones it got stuck and I can't move the labels.
I have chose the correct field so this is not the problem.
Any idea what else can make this not functioning?


texts:
I am doing Rapid Watershed Assessment for my agency and I am responsible for the Southern New Mexico and northwest Texas. I have 2 NAIP added to my ArcMap already and using it with the "Add Image Server Connection" button. The NAIP I have here is New Mexico and Texas.

Now I would like to know if there is one for Mexico that I'd like to add to my ArcMap. Is there one that can I get one using the add image service connection button?


texts: How to remove the leaflet L.control.watermark from the map

texts:
I tried to add a picture to the map by using a button. This works well by using L.control.watermark. But I want to remove the picture at the next button click and I can´t find a working solution.
Here is what I tried so far:

pictureActive = false;

showPicture() {
            if (!this.pictureActive) {
                this.displayPicture(true);
                this.pictureActive = true;
                this.pictureStyle.backgroundColor = "#002896"; //buttonStyle

            }
            else {
                this.displayPicture(false);
                this.pictureActive = false;
                this.pictureStyle.backgroundColor = "#999999";
            }
        },

displayPicture(active){
            console.log('displayPicture');
            if (active) {
                L.Control.Watermark = L.Control.extend({
                    onAdd: function(map) {
                        var img = L.DomUtil.create('img');

                        img.src = 'BUGAlog.png';
                        img.style.width = '200px';

                        return img;
                    },

                    onRemove: function(map) {
                    }
                });
                L.control.watermark = function(opts) {
                    return new L.Control.Watermark(opts);
                };
                L.control.watermark({ position: 'topright' }).addTo(this.map);
            } else {
                this.map.removeControl(L.control.watermark);
            }
        },

or:

else {
   L.control.watermark.removeFrom(self.map);;
}

But the picture stays...

Can anybody help me?


texts: Processing tool to invert/switch selection in Graphical Modeler

texts:
I want to switch/invert a selection in Graphical Modeler so I'm looking for a processing tool to do so. In ArcGIS, this can be done with "Select Layer By Attribute" with Selection type: SWITCH_SELECTION.
Can the same be done in QGIS?


texts: What do status 1 and status 5 entail? (R)

texts:
I'm running the following code using gdalUtils:

for (i in 1:20035){
  sds <- get_subdatasets(files[i])
  gdal_translate(sds[1], dst_dataset = filename[i])
}

It is a loop that turns hdf snow cover data into tif rasters.

The loop works, but every once in a while, it runs into a file that it doesn't like for some reason and throws this error message:

Error in split1[[1]] : subscript out of bounds
In addition: Warning message:
running command '"C:\OSGeo4W\bin\gdalinfo.exe"
"MYD10A1.A2003177.h09v04.006.2016071002205.hdf"' had status 1

Sometimes it give the same message, but status 5 instead. If I start the loop over, but start it at the file after the one that gave me trouble, it usually works. The problems is, I have a lot of files. I don't have the time to keep restarting it every time it does this.

Is there a way to make the loop continue and skip the files it doesn't like? What could be causing status 1 and status 5 in this context? How do I avoid this?


texts: Joining spatially AND on attribute in ArcGIS ModelBuilder?

texts:
I would like to use the tool "Spatial Join" in order to spatially join point (target feature) and polygons (join features) using the match option "within". In addition to the spatial join, the operation should join on an attribute identical in the two datasets. Take the following situation:

Imagine the colour of the points and polygons are manifested in their attribute tables in the column "colour". The red polygon should therefore be joined only to the red point, yellow to yellow and blue to blue (even though all three points are within all three polygons).

Background Info:

I'm creating a tool with ModelBuilder in order to aggregate points to groups that are within a specific distance of each other.


texts: Convert polygon to polyline with adjacent polygon IDs

texts: Is it possible to convert a polygon to polyline in QGIS WITH the adjacent polygon IDs for each polyline segment? I know one can do this in ArcToolbox but need to find out how to do it in QGIS.


texts: Calculating planar distance based on point coordinate and geodetic distance?

texts:
Using ThinkGeo, I have a Lat/Lon coordinate, and a distance of .1 miles. The .1 miles represents the radius of a circle and I'm trying to draw this radius around the lat/lon coordinate.

The map units are in meters, so a quick conversion of .1 miles to meters gives you 160.934 meters. Unfortunately, when this distance is drawn to the map the radius is smaller than what it should be. The radius on the 2D map should be closer to 208.73

After doing some research, I believe this is a projection issue. What I would like to know, is if there is a formula available that can be used to calculate the 2D distance of a line when given the lat/lon of one point and the line distance on the earth.

IE:
Coordinate (x, y) should have a .1 mile radius around it. In Map units, this would be 208.73, however I don't know how to go from the .1 mile I have to the .1 mile equivalent on a 2D map.

I am using a Mercator coordinate system, and am basically looking for an OpenLayers equivalent of the ThinkGeo's GetDistanceTo(BaseShape, GrographyUnit, DistanceUnit) function, but I don't think there is one, so I would be forced to come up with my own calculation.

The 208.73 (meters) comes from the ThinkGeo GetDistanceTo()

RadiusInMapUnits = point.GetDistanceTo(new PointShape(polyShape.OuterRing.Vertices[0]),
GeographyUnit.Meter,
ThinkGeo.MapSuite.Core.DistanceUnit.Meter);

This works fine in C#, but these functions are not accessible in OpenLayers and therefore I will need to calculate the distance myself in Javascript.


texts:
I want to convert a raster .tif file into a raster .asc file in QGIS. For this, I am selecting Raster -> Conversion -> Translate option. I am getting the output .asc file.

But, both the minimum and maximum pixel values of this raster file is displayed as 1.79769e+308 and I am not able to see any data in this output file.

It is true that there is no data available in this raster file. But, even in that case, the minimum and maximum pixel values will not be like this.

Unfortuantely, I am getting very crazy pixel values : Min = 1.79769e+308 and Max = 1.79769e+308.

Whenever I do any type of geoprocessing in QGIS with a raster which has no data / feature, I am getting the pixel values as Min = 1.79769e+308 and Max = 1.79769e+308.

What is the exact reason for this issue and how can I solve this ?


texts: What units are used by GeoPandas/Shapely area and distance functions?

texts:
it looks like a silly question, yet I can't find clear answer on that:
what units geopandas/shapely use calculating distance/area between objects?


texts: Problems when joining large shapefiles to excel table

texts:
I began with a shapefile of 330,000 features, each having already been geocoded (not that it matters I don't think).
I attempted to join this shapefile to an excel spreadsheet but of course, Arc immediately crashed (this is all being done in ArcMap).
I then broke the shapefile down into around 8 or 9 smaller shapefiles (each with at most 80,000 or so features) and attempted to try the joins again, but that too failed on me.

The field that I am joining on is a concatenation of a 7-10 digit number (found in another field), an underscore, and then a 1 or 2 digit number (also found in another field).
I believe both my shapefiles' attributes tables and the excel spreadsheet are correctly formatting/concatenating the field to be joined on.
I also believe that none of my field names violate the join validation criteria and I have even tried breaking the excel sheet into multiple sheets with fewer records.

The only time a troubleshoot of mine didn't crash Arc was when I joined one single record in the excel sheet to the shapefile I knew contained that record.
In that instance, the tables joined but the information from the single record I had entered into the excel table was not correctly joined to its match in the attribute table. Instead, all of the feature's attribute fields were made null.

Has anyone had an issue similar to this/know what I should do?
I have been troubleshooting for nearly three weeks.


texts: Choosing spatial statistical tool in ArcGIS Desktop?

texts:
When using Esri's Spatial Statistics toolbox I find the tables on the Spatial Statistics toolbox sample applications page to be very useful.  However, there are multiple rows in the tables where multiple tools are listed (e.g. Hot Spot, Optimized Hot Spot, or Local Moran's I and OLS or GWR). Some of the distinctions are straightforward but some are much more nuanced.

Is anyone aware of a resource that would help distinguish between these tools?


texts:
I am trying to create GeoExt action button to fetch the feature info from all the layers. I am still getting the info for my point features but I am getting nothing for the usa:states, that appears in the geoserver by default.

When I looked into the firebug, the html for states does not have anything in it's , http://dpaste.de/NLjzW/. But the species data that I am adding has the contents in the , http://dpaste.de/XR3Ou/. The contents in the body are the result of passing evt.text param, which is assigned to the html: evt.text in my addToPopup() function.

Why is this happening?

Update:

I am sorry i forgot to add the addToPopup() function before.

I thought that maybe there was no data in the usa:states layer, but it does have the data. If you click on the polygon in this app,

http://128.196.142.12:8080/geoserver/usa/wms?service=WMS&version=1.1.0&request=GetMap&layers=usa:states&styles=&bbox=-124.731,24.956,-66.97,49.372&width=780&height=330&srs=EPSG:4326&format=application/openlayers

You can see the data in the polygon.


texts: QGIS 3. Simple point or line layers manually

texts:
Trying to correlate historical submarine cable interruptions with geological events. Found a perfect raster-view of seabed and an .shp file of tectonic plate boundaries.
I want to create individual point or line layers of each interruption (some as points when the position was know exactly others a line representing the cable overlapping the interruption where it is not known exactly) and each volcano and each earthquake.  I have all the data in Lat/Long coordinates.
All the QGIS courses go through hours of learning which I don't need as I am 75 and this is all I want to do with QGIS! Any step by step instructions? I am tearing my hair out!


texts: I have a 2D data for a building, basically a GDB containing wall-polygon, column polygon, Glass-wall polygon. The Door layer inside the building is represented as a point. Is there any way to generate door (rectangle feature) wherever the door-points are placed inside the building. Currently I am manually drawing each door polygon but its a time-consuming task, is there any work-around for doing this as I have thousands of doors to be digitized.


texts: Query Feature Class Service - Portal display

texts:
I am new to arcgis and i have tried to use the right terminology.

I have a Query Feature Class consisting of Polygons and points referrencing a non-geodatabase that I have published as a service via arcmap (10.3.1). This service appears to have published correctly and when querying the layer directly via a browser everything appears to work correctly, as it does inside arcmap prior to publishing.

When I import this into a map in arcgis-portal the service displays as I expect the polygons are projected over New Zealand as expected.

However when I use the data table in the map and "centre on selection" from the table drop down the map zooms to Italy when the polygon was displaying on New Zealand, with a blue outline of the shape I have selected over italy.

This is strange as when I import the service the polygon itself displays correctly as does the popup. This behaviour also appears using the query object in the web app builder. It only seems to appear on service based from queries and not when i publish the service via a file-geodatabase.

Has anyone seen this behaviour before?


texts: Create a GeoTIFF from a GeoTIFF using only one of it's values

texts:
Does anyone have a method for extracting pixels from a GeoTIFF that are of a particular value. So for example if a band had values from 0 to 10 and I wanted to make an image just using the zero values and to leave the other pixel values as unknown.

My GeoTIFF is 19 GB large so I'd prefer to avoid using QGIS. I've already tried GRASS and it would freeze on me. I would prefer a solution that can use the GDAL tools but Python would be good too.

My eventual goal is to extract the polygons that surround regions of interest using the monochrome image generated from the above.


texts: QGIS Value relation end and Start points while digitizing

texts:
I do a lot of pipes/pits digitization and i am trying to streamline the process. I am attempting to fill  "To" and "From" field when digitizing lines with the IDs from a point layer they are connecting to.

Currently I digitize the lines then post process by creating start/end points, doing a spatial join on the point layers and then conducting a attribute join back on the line layer.

My goal is to fill these details as i digitise. I have played around with the fields widget and using expressions in particular the refFunctions expressions for example:

geomnearest(targetLayer,targetField)

I have got it to a point where i can fill it with the ID of the first point (from the target layer) the polyline touches (irrespective of if i want the end point or start point).

Is there an expression to identify not the first point in the target layer but the end/start point?


texts: How is intersection implemented in Shapely?

texts:
I have gone over code and manuals and questions and I can not still find out how exactly the intersection function is implemented in Shapely. Can anyone point me to the right place?

Details:

Does it compare the lat and lng of points of two objects (e.g. lines)? Must the lat lngs of points in two objects match exactly? With what precision should they match?

When I look at the points inside the intersected multipoints object of two linestrings, I can see that the points in the intersection object do not exactly match any of the points on any of the lines which means some rounding has most likely taken place.


texts: GRASS - v.clean Conflation - How to snap a layer to a base layer

texts:
Someone told me in this post that GRASS GIS can handle multilayer topology, what I have not found any information about. I am not a specialist of GRASS GIS so I would need help with that if its really feasible.

What I am trying to do is to snap a layer to a base layer, so when both share the sames boundaries they would be topologically snapped.

The base layer is the official cities boundaries of my country. The layer to be snapped is made of cities subdivisions but may not always fit.

I have to be sure that the base layer would no be modified at all.


texts:
In my vector field I would like to summarize all values in a column, how yo do so? If I right-click in the attribute table it is possible to choose summarize, but if I do so and select the column I want to include the values in the column is not summarized I only get a Sum_output. In the sum_output I have a new table with the selected column but no summary!

In my case I have created a buffer zone and want to know the length of it. The length of the buffer zone is divided into the areas where the buffer zone is. So I have around 1000 of pieces of buffer length. How can I summarize these pieces?


texts: Extract values from raster based on points and pixels adjacent to the point

texts: I have an issue. I have a set of points (n=~2000) and I would like to extract the pixel values from multiple rasters (a single-raster solution is also ok) for location of that point as well as that of all eight neighbours.


texts: How can I prevent a marker being dropped when the map is dragged in Leaflet?

texts:
I am using Leaflet to display a map in Angular8.
I want to add a marker to the clicked location.
Everything works fine, except the fact that a marker is being added after I finish dragging the map, and I do not know how to prevent that.

My .html file looks like this:

And my addMarker function looks like:

addMarker(event){
let latlng = this.map.mouseEventToLatLnt(event);
L.marker([latlng['lat'],latlng['lng']]).addTo(this.map);
}

I have tried checking if the mouseEvent movement attributes are different from 0, but it didnt have any effect.
I also tried to use a Boolean which would be set to false on dragstart and to
true dragend/dragleave/dragexit event of the map, but none of that worked as well.


texts:
I have a route defined by a series of waypoints - how can i extract as many coordinates as possible from that route as possible?

I need to extract about 100-150 coordinates that lie along a route that I have defined by a series of steps. Is this possible?

It is a series of points. Basically a path (polyline) generated by google maps. I have been able to export a KML to load in google earth, but I am not sure of how to go about extracting the data.

Consider the following.

           START           END
Step 1:   (a1, b1)       (a2, b1)
Step 2:   (a2, b1)       (a2, b2)
Step 3:   (a2, b2)       (a3, b2)
Step 4:   (a3, b2)       (a3, b3)

I would like to get 10 coordinates that lie between step 1 START AND END, Step 2 START AND END, Step 3 START AND END, and Step 4 START AND END.

So this path would return an additional 40 points.


texts:
I'm using Highmaps as a visualization map tool in my system. With Highmaps, among the official Highmaps maps, I can use custom geojsons maps. I am trying to use this one as a custom geojson: https://github.com/fititnt/gis-dataset-brasil/blob/master/mesorregiao/geojson/mesorregiao.json

The problem is, to use a custom geojson, Highmaps needs us to define an object on the geojson to tell which projection that geojson is in, as stated on the documentation. Since it is a map from Brazil, I though using the same projection as the official map from Brazil provided by Highmaps. But it doesn't work. When I try to plot a lat/long point, it plots on the wrong place.

Investigating why this would happen, I opened both geojsons in QGIS and found out that they seem to be in different projections:

(The small dot is also a brazil map)

Then I checked the attributes for each layer and found out the following:

brazil1
CRS: EPSG:29101 - SAD69 / Brazil Polyconic - Projected
Extent: -999.0000000000000000,-979.0000000000000000 : 9851.0000000000000000,9851.0000000000000000
mesorregiao
CRS: EPSG:4326 - WGS 84 - Geographic
Extent: -73.9902501510268849,-33.7515827781719508 : -28.8356556089732976,5.2721557581718343

Then I tried to use the Reproject Layer tool on the mesorregiao layer to reproject it to SAD69, as the brazil1 layer but it just created another layer in the same position as the mesorregiao was before.

So my question is: How can I reproject/transform the mesorregiao layer in order for it to overlay the brazil1 layer and so I can use it with Highmaps?


texts:
Wanted to know if is there a way to get a single path (line) to have 2 colors?

for example one next to each other

I want to display 2 different paths (multi poly-lines) at same times, and each one of them has different color, but somethings they share similar path.


texts: Geoserver WMS SQL VIEW parameters with accents

texts:
I'm getting this error when I pass latin words (with accents and "ç") as parameter to a SQL View layer.

  Rendering process failed
  java.io.IOException
  null
  Invalid value for parameter NOME_IMOVEL

Look this error on log:

  Invalid value for parameter NOME_IMOVEL
  java.lang.IllegalArgumentException: Value ARAÃUAI does not match ^[\w\d\sáàéíóúÁÀÉÍÓÚçÇ]+$

I sent "NOME_IMOVEL:ARAÇUAI".

Did anyone had this issue before? Is there any workaround?


texts: Inserting only subset of columns of shapefile to existing PostGIS table with different column names?

texts:
The situation
So I have a shapefile with several columns:
id|name_en|name_es|name_de|name_fr|...

I also have an existing PostGIS table on my remote server:
county_id|county_name|county_name_de|has_rain|...

What I want to achieve
Now I would like to INSERT data from the shapefile into my PostGIS table. However, I only need specific columns from it (namely the name_en, name_de and geometry). The remaining columns in my PostGIS table have a DEFAULT or are nullable.

What I have tried
I had a look into shp2pgsql and ogr2ogr but it seems that I cannot do my above query without creating a new table. It seems the only option I have is to drop all columns from the shapefile that I don't need, rename the columns to match the column names of the PostGIS table, and use the -a flag of shp2pgsql to insert the data into my table. (or using tools like FME)
Is there perhaps a more elegant way to do this?


texts: Heatmap with GeoJSON, Leaflet and Leaflet.heat plugin

texts:
I'm using the Leaflet.heat plugin to create an heatmap in Leaflet.

I've some problem with GeoJSON data that I've loaded through a WFS service on GeoServer. I used the function geojson2heat to get the array of coordinates from my GeoJSON but I receive the error:

  'Cannot read property 'map' of undefined at geoJson2heat'

The code:

var geoJsonUrl = "http://localhost:8080/geoserver/realbania/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=realbania%3Aroad_kill&maxFeatures=50&outputFormat=application%2Fjson"

    var geojsonLayer = $.ajax({
    url : geoJsonUrl,
    dataType : 'json',
    jsonpCallback: 'getJson',
    success : console.log("Data successfully loaded!"),
    });

geoJson2heat = function(geojson, intensity) {
        return geojson.features.map(function(feature) {
        return [parseFloat(feature.geometry.coordinates[1]),
                parseFloat(feature.geometry.coordinates[0]), intensity];
        });
        };

$.when(geojsonLayer).done(function() {
        var kill = L.geoJSON(geojsonLayer.responseJSON);
        var punti_mappa = geoJson2heat(kill, 4);
        var heatMap = L.heatLayer(punti_mappa,{ radius: 20,blur: 24, maxZoom: 13});
        map.addLayer(heatMap);
        });


texts:
I need to create a map showing slope direction and dip angles in QGIS.

How do I get either:

the dip angle to show up next to the direction arrow

or

the dip arrow symbol to change depending on the slope dip angle

I have tried drawing a line with an attribute (dip angle) and then attempting to format the line based on the attribute, which then allowed me to colour code the lines according to how steep the slope dip was. (not ideal to clear data display but it worked) However when I attempted to add more data the whole lot vanished and reloading the layer from an earlier version has none of the dip data on it.

Fixed it


texts:
I am using arcgis API's attachment editor
      var attachmentEditor = new AttachmentEditor({}, dom.byId("content"));
          attachmentEditor.startup();

 featureLayer.on("click", function(evt) {
        var objectId = evt.graphic.attributes[featureLayer.objectIdField];
        map.infoWindow.setTitle(objectId);
        attachmentEditor.showAttachments(evt.graphic,featureLayer);
        map.infoWindow.show(evt.screenPoint,map.getInfoWindowAnchor(evt.screenPoint));
      });
      map.addLayer(featureLayer);

i have written a code on file change button to check for duplicates files

$("input[type='file'][name='attachment']").change(function(e){

                     var file=e.target.files[0];
                            for (var a in attachments){
                                    if (attachments[a].contentType === file.type &&  attachments[a].name === file.name && attachments[a].size === file.size)
                                    {
                                        console.log("duplicate");
                                        e.stopPropagation();
                                        e.stopImmediatePropagation();
                                        e.preventDefault();
                                        return false;
                                    }
                                }

                });

now i want to stop event propagation to stop so that files doesnt get attached! but the esri onchange event also triggers and the file gets attached. how to stop propogation? so that only my onchange event gets called.


texts: With which gis technologies was Mapmyrun created?

texts:
www.mapmyrun.com is a fantastic online gis application which is slick, fast, reliable and full of interesting tools and functions.

As a GIS developer myself, I am interested in looking into new ways to improve my own applications and utilize new technology (mostly opensource). Does anyone have any inside information about what goes on behind the scenes of mapmyrun? is this a pure googlemaps api app?

Thanks for any replies,

Robert


texts:
Was wondering if someone could give me some pointers for a project I am working on.
I need to create a map to show nest sites for Coopers Hawk from 2001. I have lat/long data for each point I will need to add. If I add a base layer map and add points with lat/long, is there a way to show forested areas in a very basic shape? Grey or shapes with a pattern fill; I would like this map to be as clean as possible. I will then have a smaller map to the side (vicinity map) showing where in ND this study site is located.

Below is an example map from Google that is similar to the look I'm after. However my final product will have only one classification for forested area, not several. And will of course have 21 points plotted showing the Nest sites for these accipiters.


texts: Validation of relationship cardinality not working as expected

texts:
I am using ArcGIS 10.2.1 with ArcFM extensions, and the ArcGIS validation tool.

I have a feature class (poles) with several subtypes based on construction materials.  It is related to a table via a relationship class that also has several subtypes which indicate different equipment that can be attached to the poles.  To troubleshoot, I have set up every rule in the relationship to the effect

  "a [wooden/concrete/fiberglass] pole must have between 0 and 1
  [thingies/doohickies/whatzits]".

Validation under this scenario work, but we're deprecating a pole subtype, so I do not want any related records attached to it.  Essentially,

  "a [wooden/fiberglass] pole must have between 0 and 1
  thingies/doohickies/whatzits]".

  "a [concrete] pole must have between 0 and 0 [thingies/doohickies/whatzits]".

  Alternatively, I have tried leaving the checkboxes unchecked for all equipment where related to concrete pole subtype.

Either way, things get squirrely.  When I encounter poles that do not have attachments, they validate successfully.  If I validate a wooden pole with one whatzit attached, it fails with a message

  "The feature pole (subtype: wood) may not be related to
  material(subtype: whatzit) because there is no relationship rule."

If I validate a wooden pole with two whatzits attached, I get

  "The feature pole (subtype: wood) has 2 related material(subtype: whatzit) features, thus violating the equipment relationship rule that specifies 0-1."

Do I have to define cardinality for all pole sybtypes, even unused ones?


texts: Create Replica From Server fails validation

texts:
I'm working on a simple geoprocessing service for ArcGIS Server 10.3 that's meant to allow users to create a replica of a geodata service. When I pull the 'Create Replica from Server' tool into ModelBuilder, two parameters are included: Replica Name and ZZZMISSING. When I attempt to make the Replica Name a model parameter, it fails to show up, and I have no idea what ZZZMISSING means. Searching on Geonet and other sources returns nothing.

If I attempt to continue on with running the model, the tool fails validation. This happens when run as a pure python script as well. Error 000584

Does anyone have insight into ZZZMISSING? Am I going about this all wrong?


texts:
I am creating a plugin in qgis 1.8.0 and need to get a variable that is saved in the point table. I was thinking about using QgsMapToolIdentify (self.canvas) function, but it gives me error (NameError: global name 'QgsMapToolIdentify' is not defined).

Can someone help me?


texts: Unable to calculate angle between two points on Earth

texts:
I am unable to reproduce correct calculation of angular distance of the globe.

I selected two point near my home on Google Earth:

and measured the distance between them by the ruler tool.

Distance in meters is approximately 100 and distance in arcseconds is reported by program as 3.19

I have calculated this formula

(100/6371008.8)/2/Pi *360*60*60

and found it equals to 3.23 which is close to the value, reported by Google Earth and the difference is probably caused by geoid shape.

Now I tried to calculate the same value trough vectors on the computer and encountered much bigger error

As you see, first I converted geographic coordinates to 3D cartesian ones and then calculate an angle between two vectors by normalizing inner product. Unfortunately, the result is 2.18, which is much more wrong.

Intermediate value also presented.

Looks like the main problem is calculating inverse cosine for the value, close to 1. Is this true?

How to overcome this problem?


texts: Serializing and Deserializing Elements using ArcObjects C#

texts:
I am using the XMLSerializerClass of the Arcobjects SDK to serialize graphic elements of page layout into XML then saving the XML string to the database.

My issue is that when serializing graphics with symbols other than simple (e.g. Cartographic lines) it gives a runtime exception with a message (Value does not fall within the expected range.) I need help on solving this and how to serialize the scale text and elements other than text and graphics.

Here is my code by the way it is the same as the snippet found at ESRI website:

    internal static string Serialize(object element)
    {
        if (element == null)
            return null;

        XMLSerializerClass xmlSerializer = null;
        string xml = "";
        try
        {
            xmlSerializer = new XMLSerializerClass();

            xml = xmlSerializer.SaveToString(element, null, null);
        }
        finally
        {
            if (xmlSerializer != null)
                Marshal.FinalReleaseComObject(xmlSerializer);
        }
        return xml;
    }


texts:
The Scottish Environmental Protection Agency has an ARCGis server with river data I'd like to query.

https://map.environment.gov.scot/sewebmap/?layers=riverClass

At this URL it shows what I want to get

http://map.sepa.org.uk/arcgis/services/WMS_Hydrography/MapServer/WMSServer?SERVICE=WMS&CRS=EPSG:27700&SRS=EPSG:27700&VERSION=1.3.0&REQUEST=GetFeatureInfo&INFO_FORMAT=text/html&BBOX=300433.7197776127,664736.2187099421,330675.3812723706,677830.5463674661&WIDTH=1067&HEIGHT=462&LAYERS=9&QUERY_LAYERS=9&X=527&Y=&I=527&J=108&FEATURE_COUNT=50&EXCEPTION=application/vnd.ogc.se_xml&SERVICENAME=

I'm after finding the river classification at a given Longitude and Latitude.

The above URL uses British National Grid but I have only a Long and Lat.  I think that means settings sr=3395

I'm wanting to get the river classification data in JSON for my PHP website.  I've worked out this URL but it just says No Results Found.

http://map.sepa.org.uk/ArcGIS/rest/services/WMS_Hydrography/MapServer/identify?geometry=57.0759,-4.84497&layers=all&tolerance=2&sr=3395&mapExtent=57,-4,58,-3&imageDisplay=1056,816,96

What am I doing wrong in the above URL?


texts: Calculating index from sentinel-2 in Google Earth Engine

texts:
I am trying to calculate a water index from Sentinel 2 dataset from Sentinel 2, the error is 'Error: reduce.median: Error in map(ID=20180101T041721_20180101T041718_T47SND): Image.select: Pattern 'nd' did not match any bands.' I'm not clear what 'nd' means? How to export the index value from the image collection (S2)?
Here's my code,
// Function to calculate and add an AWEInsh band
var addAWEInsh = function(image) {
return image.addBands(image.expression(
    '4*(GREEN - SWIR1)-(0.25*NIR+2.75*SWIR2)', {
      'GREEN': image.select('B3'),
      'SWIR1': image.select('B11'),
      'SWIR2': image.select('B12'),
      'NIR': image.select('B8'),
}));
};

// Add NDWI band to image collection
var S2 = S2.map(addAWEInsh);
// Extract NDWI band and creat NDWI median composite image
var AWEInsh = S2.select(['nd']);
var AWEInsh = AWEInsh.median();


texts: How do I find the pgAdmin connection parameters?

texts: I need to create a connection from arcmap to pgadmin using a python module because of an arcpy script, but I am unsure of how to get the pgadmin connection parameters. I think it may be some kind of file in a directory, but I am unsure. This pgadmin database is on a windows machine.


texts:
I need a spatial-enabled SQLite solution for a x64 Windows application I am developing.

I have examined and downloaded and attempted to compile the SQLite amalgamation package; I've looked at the cSharpSqlite package; I've downloaded the System.Data.SQLite source.
The cSharpSqlite package I can at least compile, but none of the others. I am using VS2012 Professional.

There is so much outdated, confusing, incomplete and just plain incorrect information on how to build a x64 SQLite library that can load extensions. Half of the comments on SE about this are unanswered, or with a few comments that are now no longer up to date.

Can you list some simple steps to show me?
(Or link to a binary that I obviously couldn't find?)


texts:
I have a LineString I would like to "soften" in a way that if two coordinates (vertices) in the LineString are very far apart, I want to automatically add some coordinates in between.

The line string should stay the same but with more coordinates describing it.
Do you know of a way?

I have a LineString like the one on the left - and I want to add some coordinates in the between the existing coordinates (like on the right) - hopefully by JTS and hopefully automatically.


texts: Problem using shortest_path with find_nearest_link_within_distance function

texts:
I'm tried to work on the scenario that avoiding go through some path if there is a barrier near that path. It can run well with the query below:

SELECT * FROM shortest_path('SELECT gid AS id, source::int4, target::int4, shp_leng::double precision AS cost
    FROM network1
    where gid <> 35'
    ,18, 36, false, false);

Which means that the the path with gid 35 in the network1 table won't be taken into the calculation of shortest_path function.
But now, if I want to use find_nearest_link_within_distance function to fine the nearest path by a specific point, I got some problem, my code is like this:

SELECT * FROM shortest_path('SELECT gid AS id, source::int4, target::int4, shp_leng::double precision AS cost
    FROM network1
    where gid <>
    (find_nearest_link_within_distance(
'POINT(120.218325 22.998469)',
0.5,
'network1'))'
    ,18, 36, false, false);

The error information:

ERROR:  syntax error at or near "POINT"

LINE 5:     'POINT(120.218325 22.998469)',
Seems like find_nearest_link_within_distance can't be put between ' '.
I can't find the solution, can someone help me out with that?


texts: Using Field Calculator to Add a Set Amount of Time to Date Field

texts:
I wish to georeference several photos to a track created using a Garmin Oregon 450t, but the time recorded in the photos and the time recorded in the .GPX are not the same.

The format for the date field is day, month, year, hour, minute, second e.g. 27/05/2014 7:20:05 PM. My (limited) attempts with the Field Calculator so far have yielded nothing.

Is there a simple method to add or subtract something like one hour, five minutes and eighteen seconds to all records in the date field?


texts: Parse path multiple files and iterate multivalue or raster in ModelBuilder?

texts:
I have 2 files (rasters) (p1.img and p2.img), upon which I want that all model steps run. There are numeric steps from a to p (a, b, c, ..., etc) on the model.  I tryed two iterators: multivalue and raster iterators. The first one return the outputs correctly, for which step, but just for the file p1.img, doesn't run for the file p2.img (first image). The second one generate a kind of loop, running repeatedly and cumulatively on files originating from the landscape p1.img (second image).

I need the model run all step, only once, for files p1 and p2.

I suspect that the problem is the Parse Path tool, that in some way limit the model to run upon the first file (p1) only.

Any idea?


texts: Generating centerline for polygon using ArcGIS Desktop?

texts:
How could I generate a nominal centreline for a polygon and then generate lines perpendicular to this centreline at regular intervals?

I've explored generating a centreline using the tools here: http://www.arcgis.com/home/item.html?id=bc642731870740aabf48134f90aa6165 but the result has multiple branches which I don't want.

I've tried simplifying the input polygon before generating the centreline but I still have the same problem.

The only information I have for each shape is a nominal "start" point.

I have an Advanced Licence available.


texts:
I am using QGIS to define polygons in a shapefile layer which I am then exporting as an ESRI shapefile for use with JMP.

The polygon layer looks correct on-screen in QGIS, but the exported files have multiple problems:

polygon names have not stayed with the associated polygons - the names are still present, just labeling a different polygon in the output files.
entire polygons are 'missing' in the output files.

Is there a way to fix this problem?

I have narrowed this issue down to just the 'dropped' polygons portion of the problem.

The other 2 issues I cited originally have been resolved as follows:
-The 'old' polygon boundaries were being drawn by JMP from an out-of-date map in the system.
-The map label scrambling was due to not adding a sequentially numbered column to the .dbf file.  The 'id' column appearing in the dbf file does not match the 'id' column of the .shp file, however, the 1st row of the .dbf file does correspond to polygon with id = 1 in the .shp file.


texts: Rotate GeoTiff but maintain georeference

texts:
I'm currently trying to 'cheat' a GeoTiff by rotating the image but keeping the georeference the same, I.E. I just want the actual visual image rotated.

Currently I'm reading in the image using rasterio and clipping it using the mask method. When I print the shape of the output image from mask I get (1, 32, 32).

I then run:

out_image = transform.rotate(out_image, 90).astype(np.float32)

and still get (1, 32, 32) when printing the size.

However when I write out the GeoTiff and look at the image I only get a band of pixels rather than the rotated image as shown below:

Original:

Rotated & Clipped:

Why is it giving me just a band of pixels?

After Ipdudley's comment:

def create_crop(raster):
    affine = raster.affine
    point_x, point_y, radius = get_blob_point(raster)
    out_image, out_transform = mask(raster,
                                    [get_point_crop_polygon(Point(affine * (point_x, point_y)), radius)],
                                    crop=True)
    out_meta = raster.meta.copy()

    print(out_image.shape)

    out_image = np.rot90(out_image, k=1)

    print(out_image.shape)

    out_meta.update({"driver": "GTiff",
                     "height": out_image.shape[1],
                     "width": out_image.shape[2],
                     "transform": out_transform})

    with rasterio.open("test.tif", "w", **out_meta) as dest:
        dest.write(out_image)


texts: Defining the azimuthal equidistant projection of an Environment Canada weather radar map

texts:
Environment Canada helpfully provides recent captures of all national weather radar stations at http://dd.meteo.gc.ca/radar/PRECIPET/GIF/ at ten minute intervals.  These are the same GIF images as those posted on their weather website (e.g. http://weather.gc.ca/radar/index_e.html?id=xsm) and inserted below.

This question usefully describes how to download current weather radar data in KML formats from Environment Canada.  However, I need to automate the processing of a deep archive of GIF images captured at ten minute intervals.

I understand, too, that raw radar data in spatial formats is available from Environment Canada at cost recovery pricing that will have much higher thematic and spatial resolution than is possible from these GIF rasters.  However, such precision is unimportant for this application.

The challenge then is to define the coordinate system of these GIFs in a known projection.  The location of the radar at the centre of the map ("+") is known and published (51.0246, -113.3981 for the radar station in the above image).  I have also determined through inquiries to Environment Canada that these radar images are in an azimuthal equidistant projection.

How would one form a PROJ4 string, or define a projection in ArcGIS, that would describe these GIF images in their untransformed state, and so take advantage of this free resource.


texts: Generating polygons from centroids with rotation and dimensions

texts:
I found this from @crmackey at Creating rectangles on centroid points in ArcPy?

It is exactly what I was looking for and works great, however I need to add rotation to the polygons.

How could I add this to @crmackey's python script?


texts: Combine data of OSM roads into longer lines using PostGIS

texts:
For my vector map I'd love to display highways at a quite early zoom level. The problem is that this data would be quite big, so I thought I simply ST_Simplify it. The problem though is that the OSM data consists of a lot of small road segments. So for Germany f.e. there are roughly 60000 segments of type highway.

Does anybody have an idea on how to better simplify the data? I was thinking of creating longer polylines by combining the small ones and then ST_Simplify-ing those?!?

The problem is just that I don't know how I should do that...

I could do a ST_Union on all of my roads, but that would create ONE geometry. So maybe group them somehow. There are relations in OSM, but I don't think that there is an easy query for "Give my only highway", right?

As a bonus, if would be awesome to have only a line in one direction, as for my zoom-level the two lines would look as one anyway.


texts:
Qgis 2.2, Windows 7

I am looking to create buffers around city lights (the raster). Currently, I have simple polygon buffers around the point layer (oecdminusa), but this is not accurately capturing city sprawl. I want my buffers to align with the jagged, uneven shape of the metro areas. I realize that I can add a vector layer and draw the buffers myself, but this is incredibly time consuming. Below is a same of my project to help facilitate responses.


texts: Really basic question, but I need details and help running Maperitive from my mac. I've tried launching it from the terminal and tried running it through WineBottler. If anyone has experience with this, please help!


texts: Using AutoCAD Map 3D with ArcGIS Desktop?

texts:
What is the actual use of AutoCAD Map 3D?

It seems that ArcGIS Desktop has many tools for analysis.

Is there any other advantage in using AutoCAD Map 3D?


texts:
In pyQGIS, I am trying to order features of a layer by two attribute columns, first by "Circuit" and then by "Region," but I can't get the second criteria to register. I believe I am using the wrong notation, and I could not find an example of two criteria being used online anywhere. Here is what I currently have:

    for feature in layer.getFeatures(QgsFeatureRequest().addOrderBy('Circuit',True).addOrderBy('Region',True)):


texts: ST_Instersects and Join result to new table

texts:
I am having two tables, table1 and table2.

I want to know which parts of table2 intersect with table1. Having that information, I want to write the attributes from table2 into table1 (where they intersect) and create a completely new table3 of it. I want to preserve the geometry (polygons) from table1

CREATE TABLE table3 AS
SELECT t1.*, t2.c, t2.d FROM table1 t1
JOIN table2 t2
ON ST_Intersects(t1.geom, t1.geom);

Would that give me my desired result?


texts: Is there a way to insert the parameter in a WFS-StoredQuery so that it does not have to be assigned

texts:
I have a StoredQuery with 4 parameters. If I assign all 4 parameters everything works as expected. This is my StoredQuery

<?xml version="1.0" encoding="UTF-8"?><wfs:StoredQueryDescription xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fes="http://www.opengis.net/fes/2.0" xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" id="gemarkungsname_fln_fsn_zae">
    <wfs:Parameter name="gemarkungsname" type="xs:string"/>
    <wfs:Parameter name="fln" type="xs:string"/>
    <wfs:Parameter name="fsn_zae" type="xs:string"/>
    <wfs:Parameter name="fsn_nen" type="xs:string"/>
    <wfs:QueryExpressionText isPrivate="false" language="urn:ogc:def:queryLanguage:OGC-WFS::WFS_QueryExpression" returnFeatureTypes="KRE_ALKIS:sg_flurstueck_f">
        <wfs:Query wfs:typeNames="EKR_ALKIS:sg_flurstueck_f">
            <fes:Filter xmlns:fes="http://www.opengis.org/fes/2.0">
                <fes:And>
                    <fes:PropertyIsEqualTo>
                        <fes:PropertyName>
                            <fes:ValueReference>gemarkungsname</fes:ValueReference>
                        </fes:PropertyName>
                        <fes:Literal>${gemarkungsname}</fes:Literal>
                    </fes:PropertyIsEqualTo>
                    <fes:PropertyIsEqualTo>
                        <fes:PropertyName>
                            <fes:ValueReference>fln</fes:ValueReference>
                        </fes:PropertyName>
                        <fes:Literal>${fln}</fes:Literal>
                    </fes:PropertyIsEqualTo>
                    <fes:PropertyIsEqualTo>
                        <fes:PropertyName>
                            <fes:ValueReference>fsn_zae</fes:ValueReference>
                        </fes:PropertyName>
                        <fes:Literal>${fsn_zae}</fes:Literal>
                    </fes:PropertyIsEqualTo>
                    <fes:PropertyIsEqualTo>
                        <fes:PropertyName>
                            <fes:ValueReference>fsn_nen</fes:ValueReference>
                        </fes:PropertyName>
                        <fes:Literal>${fsn_nen}</fes:Literal>
                    </fes:PropertyIsEqualTo>
                </fes:And>
            </fes:Filter>
        </wfs:Query>
    </wfs:QueryExpressionText>
</wfs:StoredQueryDescription>

If I assign all 4 parameters everything is fine: For example as in the following URL. This query shows me 1 result.

GEOSERVER/wfs?request=GetFeature&service=WFS&version=2.0.0&StoredQuery_ID=gemarkungsname_fln_fsn_zae&gemarkungsname=Beetz&fln=6&fsn_zae=97&fsn_nen=1&outputFormat=JSON

If I omit a parameter, then nothing is found. Certainly because the AND part fails. If I change my example above - I left out the parameter fsn_nen, nothing is found:

GEOSERVER/wfs?request=GetFeature&service=WFS&version=2.0.0&StoredQuery_ID=gemarkungsname_fln_fsn_zae&gemarkungsname=Beetz&fln=6&fsn_zae=97&fsn_nen=1&outputFormat=JSON

Is there a way to insert the parameter in the StoredQuery so that it does not have to be assigned?


texts:
I am new to QGIS and I need to know if if is possible to merge two shapefiles that do not have a common field and then export to Excel.

Example of shapefiles:

Countries broken up in to Municipality sections (not on a suburb level)
Company active client base by suburb


texts: Applying distance/area dependent procedures in geographic coordinates over large areas?

texts:
I'm currently doing some niche modelling with data in geographic coordinates spanning all of Latin America. I am using R for my analysis. Some of the tasks I have to perform are area/distance dependent and yield incorrect results when applied in geographic coordinates. For example, spatial sampling (sp::spsample) leads to a bias towards more points in southern South America and buffering points and polygons (rgeos::gBuffer) leads to stretching/skewing of the buffer away from the equator.

What's the best way to address this issue? Should I project my data, apply the necessary procedure, then project back? If so, what projection would work for such a large area? Ideally, I'm looking for a general approach that could be applied to any region, but I fear this doesn't exists.


texts:
I'm using OSM (online) with OpenLayers to show my map (I don't have a mapserver) but when I do this:

map = new OpenLayers.Map( 'map',  {numZoomLevels: 7, units:"km", minZoomLevel: "10" } );
map.addLayer(new OpenLayers.Layer.OSM("Main Map"));
map.zoomTo(3);

The map comes with too much information. I need to show only roads and countries.
Any way to do this?


texts: ArcMap add in constructor called not called on start up

texts:
I am converting some old tools to the new Add-In format and have noticed that the constructor is no longer being called during startup, instead it is being called when the tool is clicked for the first time (second and subsequent call OnActivate only).

This particular tool is in a toolbar add-in and is of type ESRI.ArcGIS.Desktop.AddIns.Tool and should only be enabled if ArcMap is currently editing. Previously the constructor was called and set the tool.enabled = false arbitrarily (as you can't be editing on startup) and added an event handler for IEditEvents_OnStartEditingEventHandler which set the too.enabled = true (and stop editing too, enabled = false).

Now that the tool is made into an add in I discovered by step-debugging that the constructor for the tool isn't called until the tool is clicked. After clicking the tool behaves in the intended manner as the events are wired. Is there a way to call the constructors during ArcMap startup, soon after or does anybody know of any other workaround?


texts: How to send data from my application to QGIS?

texts:
I have an application that makes analysis on maps . After making analysis I have new map in my application.

My application doesnt use QGis API. How can I send results back?

Should I construct object QgsVectorLayer  from my application and send new maplayer to QGis?
What approach is better to use?

I want to create a plugin for QGis to work with my application and use TCP IP protocol. My application will be SERVER and QGis plugin CLIENT.

My application works with graphs. It accepts .mif files.
Could I construct QgsVectorMaplayer from points, lines and polygons?


texts: QGIS Legend - distribution of items across columns - recurring problem

texts:
This question relates to a previous question I posted four years ago: QGIS Legend - distribution of items across columns
I've created a map and in print composer I've added a legend with ten items, which I want to break across five columns evenly. I've specified the number of columns and checked Split Layers, but the end result is three columns of two items, one column of three items, and a final column of one item:

When I originally posted a question about this, Joseph replied, suggesting I adjust the column count setting to 6, which worked perfectly, and has continued to work until a couple of months ago, when suddenly the legend items have become skewed again. Can anyone offer any further advice on how to get the columns to display evenly? Thanks.


texts: I am searching for a way to save a layout as .qpt file, is that possible with PyQGIS and how?


texts:
I'm going to host a customized xyz tiled layer so I tested on my local machine to add that layer to OpenLayers Map control. I've already rendered some tiles using generate_tiles.py and Mapnik. I've already confirmed that there's no problem accessing local files by starting my Chrome in --allow-file-access-from-files mode and adding local KML layer. However, not only did the debugger stop the page with the following unhandled exception message, but the map control wouldn't load as well.

Stack trace:

dh (ol.js:112)
ad (ol.js:43)
l.dispatchEvent (ol.js:41)
l.Qn (ol.js:452)
l.Pf (ol.js:125)

paused on exception: 'TypeError: cannot use 'in' operator to search for '10' in undefined'

Related js code:

var projection = ol.proj.get('EPSG:3857');
var raster = new ol.layer.Tile({
    source: new ol.source.OSM()
});

var map = new ol.Map({
    controls: ol.control.defaults({
        attributionOptions:({
            collapsible: false
        })
    }),
    layers: [raster],
    target: document.getElementById('map'),
    view: new ol.View({
        center: ol.proj.fromLonLat([116.5, 40]),
        zoom: 10
    })
});

var xyz = new ol.layer.Tile({
  source: new ol.source.XYZ({
    attributions: ["Local test."],
    url: './{z}/{x}/{y}.png'
  })
});
map.addLayer(xyz);


texts: Web AppBuilder custom widget how to add third party node modules?

texts:
I know that ArcGIS Web AppBuilder Desktop is built using Node.js

Is there any way we can add the third party node.js modules in Web AppBuilder Desktop using the npm command and then access these modules in the custom widget?

For example, I would like to use the npm module: https://www.npmjs.com/package/xlsx
In a custom widget

Where do I write the command to download the module?

After downloading the module how do I access it in the custom widget?


texts: QGIS WMS tooltip displaying web address from data

texts:
I am using BGS WMS borehole data in QGIS:

https://map.bgs.ac.uk/arcgis/services/GeoIndex_Onshore/boreholes/MapServer/WmsServer

I'm trying to get a tooltip to come up displaying the URL from the attributes for each point.

How can I do it or are there any other options for getting the point to open a URL in the default web browser when clicked?


texts: Delete points on one side of a line in QGIS

texts:
I have a bunch of points and line that represents a boarderline as shown below:

I want to delete all the points one the right side of the line, and letting the points in the left side stay. I dont know how to do that without being a polygon with closed paths. I have tried to use spatial query, but its only working with polygons as far as I know.
What can I do?


texts: Using ArcObjects to open or access shapefile?

texts:
I am writing a program with a dialog box that when they click on the map button a shapefile will open. I wrote a program that opened a map document is it the same language as that is. Which is the following :

Dim pDoc As IDocument
Dim pApp As IApplication
Set pDoc = New MxDocument
Set pApp = pDoc.Parent


texts: PostGIS : I want to use ST_OffsetCurve with MultiLineStrings

texts:
I need to use the function ST_OffsetCurve for a multilinestring, but PostgreSQL gives me the error that the function is only for Linestrings. Is there a way arround?

I want to use the function beceause I need to check if 2 lines (multilinestrings actually) are located at contrary sided of another multilinestring. For example, I need to find 2 lines, 1 on the right and 1 on the left side of the road (and the road is located by a line).
I wanted to do this check by performing the ST_OffsetCurve function and the ST_Distance function. (if a line is on the right side of the road an you perform an offset to the right, the distance between the lines gets bigger).

I hope this was understandable, so;

Is there a way to use ST_OffsetCurce for Multilinestrings ?
Is there maybe another way to achieve what I want ?

Thanks!


texts:
Is there a way to edit the precision of polygon points in QGIS so that each coordinate has the same number of decimal places?

For example, the coordinate 23.18273917, -84.29172638491 would be converted to 23.18274, -84.29173 if 5 was entered.


texts: How to iterate through features in a shapefile using R?

texts:
I am interested in iterating through a point shapefile to perform tasks on a point by point basis using R.  In Python, this can be accomplished using the following workflow:

import arcpy

shp = r'C:\path\to\shapefile.shp'

with arcpy.da.SearchCursor(shp, ["Field", "SHAPE@"]) as cursor:
    for row in cursor:
        print row[0]
        # Perform some action with row[1] (i.e. the point geometry)

How can I iterate through a point shapefile to access individual point geometry using R?


texts: GDAL Virtual File System (vsitar, vsizip, vsicurl) not working

texts:
I want to access a landsat tar file like :

gdalinfo "/vsitar/vsicurl/https://dds.cr.usgs.gov/ltaauth/hsm/lsat1/collection01/oli_tirs/T1/2018/146/039/LC08_L1TP_146039_20180119_20180206_01_T1.tar.gz?id=ndauj8dbfj9tgucjgsu0l38sst&iid=LC81460392018019LGN00&did=543821091&ver=production"

But in my case it is not working.

enterERROR 4: '/vsitar/vsicurl/https://dds.cr.usgs.gov/ltaauth/hsm/lsat1/collection01/oli_tirs/T1/2018/146/039/LC08_L1TP_146039_20180119_20180206_01_T1.tar.gz?id=ndauj8dbfj9tgucjgsu0l38sst&iid=LC81460392018019LGN00&did=543821091&ver=production' does not exist in the file system, and is not recognized as a supported dataset name.
gdalinfo failed - unable to open '/vsitar/vsicurl/https://dds.cr.usgs.gov/ltaauth/hsm/lsat1/collection01/oli_tirs/T1/2018/146/039/LC08_L1TP_146039_20180119_20180206_01_T1.tar.gz?id=ndauj8dbfj9tgucjgsu0l38sst&iid=LC81460392018019LGN00&did=543821091&ver=production

In a ftp in my LAN it is working fine.

What is the problem?