I have a very simple question which I can not really find answers to.
I am working with OpenLayers 3. I want to display a WFS Service with a layer defined in GeoServer 2.6.2. This layer is defined with a custom reference system which I have defined previously in GeoServer. I show you this SRS:
+proj=lcc +lat_1=14.25 +lat_2=13.3166667 +lat_0=13.783333333333333
+lon_0=-89 +x_0=500000.00004 +y_0=295809.17715 +k_0=0.999967040229754
+a=6378206.4 +rf=294.9786982138982 +units=m +no_defs
+towgs84=0,105.5,197.2,0,0,0,0
OpenLayers library does not recognize this projection. I should define it before calling the WFS Servicek. I consulted many examples on the web page OpenLayers, but I can not solve the problem.
Someone could help me? Thank you very much in advance.
Related
I have access to 2 WMS services that show Text as Rasterlayer at a specific scale (1:2500). Problem is this 'scale' is so small that you can't work within our project because you have no overview.
BEst solution would be to override the scale to the WMS call and tell QGIS under 1:20000 to translate this to 1:2500 for this specitif layer. Is this even possible? And if so how? Proxy or something?
Is there a lib outside of mapbox gl for loading the tiles of a giving bbox and zoom level?
i've created some tilesets and styles in Mapbox and want to load it in other viewers (cesium, google maps,...)
I only have min, max lonlat and a z-level and need
to load the specific tiles at the abstraction for the z-level
iterate over the features
get the geometry of the features in wgs84
#csdev. Thanks.
Yes i know there are other implementations in other viewers (ol3, leflet). But i'm not searching for a viewer, only for a framework which service the logic for loading and unloading vector tiles by given bboxes. Because i need it especially for cesium.
I see that there is a possibility to combine ol3 and cesium (ol3-cesium). But i think i will lose at this point functionality of cesium.
mapbox-gl-js is the native library for interacting with mapbox vector tiles - the linked docs show it is build on web-gl, like cesium.
Regarding other libraries:
Leaflet has plugins for showing your mapbox vector tiles - some listed on the site only work on older versions of Leaflet, some only newer.
Similarly, OpenLayers added support for vector tiles, and different examples out there work only with different versions of OpenLayers - their official site has two examples that work with the current version 3.20.
Esri is rolling out their vector tile implementation right now, and there are posts in esri forums from last year explaining specifically about how to utilize mapbox vector tiles using their javascript api.
All of those libraries let you do what you are asking - load the mapbox vector tiles, process features and attributes, and work in different projections.
Edit: (can't post comments yet) - OK, your question says (cesium, google maps,...) so I wasn't sure what was implied by the ellipses. I will add that at least one of the leaflet plugins, and some of the solutions I have seen out there in adapting vector tiles for openlayers or leaflet utilize the mapbox-gl-js library to load and parse vector tiles, then adapt the data for the viewer in question. Obviously if you write a custom solution for cesium an approach like that is possible, and that both libraries are web-gl based is a positive thing. However, I have not done it myself so no more to add. I'm sure you googled 'mapbox cesium' so found things like the recent google post about incorporating MB tiles to cesium, and some built-in cesium classes related to mapbox. All good places to start.
Edit Lastly, I'll say that you might want to be looking at the various libraries that are part of the mapbox vector tile ecosystem - so this library, for example, might be as close as you will get to what you want at present without requiring you to go down to the web-gl level for a custom solution: mapbox vector-tile-js
Maybe there's a better place to ask this, but I figured maybe someone has come into this problem before and can give me a hand with it.
I have a bunch of locations (36k) and they are represented using SIRGAS2000 (UTM 21s) coordinates. I need some way of converting them to traditional LatLng (Geodetic) format so I can upload them to my database and use those coords with Google Maps API.
Has any of you ever bumped into something similar?
Ok, I just found a JS library for this task. It will convert from and to various types of coordinates.
Here's a link to it in case anyone needs it ...
http://www.jstott.me.uk/jscoord/
Some examples in there too
I need to create a KML file that will overlay buildings on a map. I have a lot of buildings so there will be a lot of coordinates to figure out. Is there a tool that can help out with this?
Thanks.
Presumably you already have the addresses of these buildings. To generate the coordinates of these automatically, you can put the addresses in a single file and write a few lines of code to iterate through calling something like the GeoNames web service
http://www.geonames.org/export/web-services.html
which will geocode them for you. While their basic service is free, they also have a premium service:
http://www.geonames.org/commercial-webservices.html
I want to have a vector layer of the world, which shows the country borders, states and their names in English. Is there a layer that exists that I can control the colours?
Cloudmade doesn't let me quite do this, nor does openstreetmap and a bunch of others. I'm thinking I might need to create a raster image and overlay that except I dont know where to get an accurate EPS/vector map I can edit and overlay.
Running out of options!
You have different options depending of your needs:
The easiest one is to use a public
WMS service that offers the
information you need. You can check
catalogues like this one or a
Google search like this. If
your are lucky to find a service
that suits you, just add it as a WMS
layer in OpenLayers as described in
this example.
If you can't find a public service, you will have to serve the
geographic data yourself. You have
to find a dataset of the world
countries (the most common formats
are ESRI shapefile and KML).
If you find a shapefile (try here), you will
have to serve it via a map server like
MapServer or Geoserver.
Both are pretty straightforward to
set up, but choose the one that suits you best (MapServer is a CGI and Geoserver is Java-based). Once you have configured a WMS service with the countries data, you can add it to your OpenLayers app following the previous example.
If you can't or don't want to use a map server and you have a KML file of the world countries, you can also add a vector layer to OpenLayers from a KML file, as described in this example. Be careful, because all geometries will be rendered in the user's browser (with SVG or VML) and for large datasets, this can be a performance issue. Check this example to see it in action.
I hope this give you a few clues.