Gery
  • Member for 9 years, 4 months
  • Last seen this week
  • Lima District, Lima Region, Peru
Extract lat/long from native PostgeSQL point type column
12 votes

you need to use: SELECT ST_X(geom), ST_Y(geom) FROM locations; I suppose that locations is a table of points with the geometry named as "geom". Hope this helps,

View answer
How to convert 6 & 7 digit coordinates to degrees latitude & longitude
9 votes

Try this one: http://cs2cs.mygeodata.eu/ or use "proj" (command line below assuming UTM zone 17 south and wgs84): # geographical coordinates (ie. longitude,latitude) to utm proj -f "%.4f" +proj=...

View answer
Extracting all vertices from line shapefile in a simple way? (no python scripting)
Accepted answer
7 votes

I found it, this dirty hack is not elegant at all but it works great, my command-line solution as follows: ogr2ogr -f CSV tmp.csv your.shp -lco GEOMETRY=AS_WKT -s_srs EPSG:4326 -t_srs EPSG:4326 -...

View answer
Many mapfiles with few layers, or all layers in one mapfile?
Accepted answer
7 votes

The best by far is to use one main mapfile with INCLUDE directives to call other mapfiles (all of them being "simple and specific Map Files" btw). This will definitely speed things up. I tested that ...

View answer
Heat map / Density map from dynamic points table in MapServer (GeoServer)?
6 votes

Thinking that you need heat maps rendered on the fly, I would go for these options instead: Leaflet: http://www.patrick-wied.at/static/heatmapjs/example-heatmap-leaflet.html OpenLayers: http://www....

View answer
How to insert a GeoJSON polygon into a PostGIS table?
5 votes

your geojson must have UTM values instead, you could transform that with Proj or other online tools, but you can do it easily and directly with postgis before inserting it into your table, try this (...

View answer
How can I remove default zoom in/out [+/-] buttons from openlayers to keep the navigation bar on?
Accepted answer
4 votes

Do you need to remove the big one (blue one?) or the small one behind it? if the big one is the issue, try commenting: map.addControl(new OpenLayers.Control.PanZoomBar()); and you should get only ...

View answer
convert raster to xyz without no data values
4 votes

try: grep -v NaN xyz > xyz_without_nodata You should define your nodata values, I assumed NaN here. You could try setting -a_nodata with "none" which means that you don't want that in the output, ...

View answer
Single tiled Mapserver WMS to avoid Labels and features cut along tile borders and repeated labels
Accepted answer
4 votes

This is a comparison between multiple tiles and single tile using WMS in OpenLayers: var map = new OpenLayers.Map({ div: "mapDiv", layers: [ new OpenLayers.Layer.WMS( "...

View answer
How do you convert to degrees and minutes from 8/9-digit lat/lon DMS code?
4 votes

If you're working in Ubuntu, you could use this in a shell script: To get longitude like 81°5.8' (degree and minutes from code in d,m,s): tmp0=`echo 081054800 | cut -c2,3` tmp1=`echo 081054800 | cut ...

View answer
Execute OpenLayers WPS request using WPS Client
3 votes

It looks to me that the problem is about the runoff variable (WKT) you're passing, because JS console is complaining about an unexpected token, probably you need to wrap your geometry with double ...

View answer
Open source/free software for generating a 3D view of mapping?
3 votes

For 3D (and 2D), try GMT (http://gmt.soest.hawaii.edu/), here some 3D examples: 3-D perspective, mesh-line surface. 3-D perspective, artificially illuminated grayshaded image. A 3-D bar graph. ...

View answer
Adding and toggling legend with layer in OpenLayers?
Accepted answer
3 votes

You can use the attribution feature of OpenLayers for this: http://openlayers.org/dev/examples/attribution.html This will work accordingly (ie. active/deactivate) with every layer in your map. You'...

View answer
GeoJSON layer on Google Maps API is not showing
3 votes

I used this web to validate GeoJSON: http://geojsonlint.com/ After pasting yours, I got: Invalid GeoJSON POSTed data was not JSON serializeable. Try this link to test all your GeoJSON files to see ...

View answer
Why do I get wrong length using STLength on MultiLineString?
Accepted answer
3 votes

Check this for some clarifications: https://stackoverflow.com/questions/2037354/sql-server-units-question. Basically, you need to use a spatial reference system to do the conversion. It seems to me ...

View answer
Combining DragFeature and ModifyFeature using OpenLayers
Accepted answer
2 votes

I think you need this. Combining those two tools can be a solution, but if you split these two tasks in two icons/individual approaches you could have a cleaner code and probably you will spend less ...

View answer
popup when new feature is created
2 votes

Have you checked this out? It seems to me that you can adapt it to meet your needs: http://openlayers.org/dev/examples/select-feature-openpopup.html I put here a live demo of the example above ...

View answer
can I install GIS on mackbok?
2 votes

Yes, it's supported: Many people have asked members of the ESRI Education Team about whether ArcGIS works on Intel-based Macintosh computers. Thanks to some tools presented by Apple and by ...

View answer
Can Bing base layers be used with the Mapfish / Geoserver print plugin?
Accepted answer
2 votes

Sure, here they go: https://groups.google.com/forum/#!topic/geoext-users-archive/CuRNR0Bunao http://lists.mapfish.org/pipermail/users/2009-June/001358.html http://web.archiveorange.com/archive/v/...

View answer
How to transform a PostGIS bounding box?
2 votes

How about: select st_transform(st_extent(geom,900913),4326) from mytable; Or the way around: select st_transform(st_extent(geom,4326),900913) from mytable;

View answer
GXP: FeatureManager is not firing WFS GetFeature requests when setting EPSG:3857/900913
2 votes

I don't work with geoserver but mapserver, and once I did a request on google maps. It turned out that it didn't return any features because of google map, the URL took by default its projection ...

View answer
Need assistance setting center coordinate with GDALWARP
2 votes

you'd need to use first EPSG:3857 instead of EPSG:3785. I'd say that you need to define also the center coordinate in your gdal commands. I'd say you need for that two commands, gdaltransform and ...

View answer
Not able to convert GPS coordinates received from a software into Latitude and Longitude
Accepted answer
2 votes

Try: PROJ: https://trac.osgeo.org/proj/, http://proj.maptools.org/faq.html Or the online tool: http://cs2cs.mygeodata.eu/ Hope this helps,

View answer
How to make a raster layer transparent via MapServer WMS
2 votes

probably what you need is to set both OFFSITE and TRANSPARENCY in the layer section, something like this: LAYER NAME 'Raster' TYPE RASTER CONNECTIONTYPE postgis CONNECTION "user=postgres password=... ...

View answer
cross domain problem with :OpenLayers.Protocol.HTTP
2 votes

You would solve this using OpenLayers.request methods, check this out: The above types of request are useful because they are asynchonous. That is, the user can continue to view and interact with ...

View answer
OpenLayers Rule is not working as expected
2 votes

it seems that you have an extra comma in the first part of the code, try this: var ruleSegmentoLogradouroStyle = OpenLayers.Util.applyDefaults({ fillColor: "#0000FF", fillOpacity: 0.9, ...

View answer
Why the layer can be loaded to Google Maps not OpenStreetMap using MapServer?
2 votes

map.setCenter( new OpenLayers.LonLat(1.147, 52.472).transform( new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject() ), 5 ); ...

View answer
GeoServer and OpenLayers in production - Securing WMS calls?
Accepted answer
2 votes

how about this: http://osgeo-org.1560.x6.nabble.com/Load-GeoServer-WMS-secured-layers-with-OpenLayers-td3919938.html, basically it uses a proxy script to do what you need.

View answer
Replacing protocol in geoext.form.formpanel‏
Accepted answer
1 votes

The solution was to use only "protocol.options.url = newUrl;" instead of protocol.destroy(); or protocol.read();, a complete explanation is in this answer to Overwriting URL of OpenLayers....

View answer
Is it possible to display a gray color GeoTIFF in ERDAS as it simply occurs in QGIS?
Accepted answer
1 votes

Found it: Choose "Metada" (right click -> Metadata) Enter the no data value in Edit -> Set/Clear No Data Values -> Set no data (my case -9999) Enter the no data value in Edit -> ...

View answer
1
2 3 4 5