[Geomoose-users] Change projection
TC Haddad
tchaddad at gmail.com
Wed Jan 7 06:31:54 PST 2015
Some ideas:
The second error indicates there is something wrong with your query.
- Have you tested the query itself at the PostGIS psql command line? Are
any errors reported there (with or without schema)?
- be careful with upper case / lower case in your PostGIS query. In this
portion of your error:
.... as geom,"unterkunftid" from Angebote .....
Should Angebote have upper case here? If so, you may need to use quotes.
Suggest if possible to always use lower case in table and relation names to
prevent case errors in queries.
On Wed, Jan 7, 2015 at 6:11 AM, <geo.graefin at web.de> wrote:
> Thank you for your answer,
>
> my overlay data is projected in EPSG:3857, so I changed the map file, see
> appendix. I proofed the creating of the image with the tool shp2img, but it
> detected an error:
>
> msDrawMap(): Image handling error. Failed to draw layer named
> 'unterkunft'. <br>
> msPostGISLayerOpen(): Query error. Database connection failed (invalid
> connectio
> n option "schema"
> ) with connect string 'host=localhost dbname=postgis_testdb schema=public
> user=p
> ostgres password=******** port=5432'
> Is the database running? Is it allowing connections? Does the specified
> user exi
> st? Is the password valid? Is the database on the standard port? <br>
>
> But I am connecting with the database.
>
> When I leave out "schema=public" in the string of "DATA" in my map file
> then i get the following message:
>
> msDrawMap(): Image handling error. Failed to draw layer named
> 'unterkunft'. <br>
> msPostGISLayerWhichShapes(): Query error. Error executing query: FEHLER:
> Relati
> on "angebote" existiert nicht
> LINE 1: ...metry">,'NDR'>,'hex'> as geom,"unterkunftid" from Angebote w...
>
> So shall I leave in the schema attribut?
>
> I would be very grateful if you check my map file. Are the projections
> listed correctly?
> Do you have an idea for solving the error message? I will send it also to
> the mailing list of MapServer.
>
> Thank you in advance!
>
> Greetings, Geograefin
>
>
> *Gesendet:* Dienstag, 06. Januar 2015 um 17:01 Uhr
> *Von:* "TC Haddad" <tchaddad at gmail.com>
> *An:* geo.graefin at web.de
> *Cc:* "geomoose-users at lists.osgeo.org" <geomoose-users at lists.osgeo.org>
>
> *Betreff:* Re: [Geomoose-users] Change projection
>
> If you want to use public map tiles, most likely you should set GeoMoose
> to use 3867 as a base projection (this is the default in the demo). This
> means that your overlay data will be reprojected from EPSG 25833 in order
> to display correctly. Coordinates in the GeoMoose display will be in EPSG
> 3857 in this case.
>
> How are you accessing your overlay data? If it comes from Mapserver, you
> can add your projection of *EPSG:25833 *to the LAYER portion in the map
> file so that Mapserver can access it correctly. e.g.
>
> MAP
> ....
> WEB
> METADATA
> 'ows_title' 'my_map'
> 'ows_srs' 'EPSG:3857'
> 'ows_enable_request' '*'
> 'ows_onlineresource' 'http://www.geomoose.org'
> END
> END
> PROJECTION
> 'init=epsg:3857' #projection of the map
> END
>
> LAYER
> NAME 'my_layer'
> TYPE POLYGON
> DUMP true
> TEMPLATE fooOnlyForWMSGetFeatureInfo
> DATA './my_data.shp'
> METADATA
> 'ows_title' 'my_layer'
> END
> STATUS OFF
> TRANSPARENCY 100
> PROJECTION
> 'init=epsg:25833' #projection of the layer
> END
> CLASS
> NAME "My Layer Name"
> STYLE
> WIDTH 0.91
> OUTLINECOLOR 180 180 180
> COLOR 145 155 92
> END
> END
> END
> END
>
>
> On Tue, Jan 6, 2015 at 6:54 AM, James Klassen <klassen.js at gmail.com>
> wrote:
>>
>> I think OSM (and most other widely available tilesets) only support
>> 3857. The map sources you use need to support the projection you select in
>> GeoMoose.
>>
>> Also, tilesets only support fixed zoom levels. (Although I think there is
>> an OpenLayers server_resolutions parameters that works around this by
>> rescaling the tiles in the browser. I don't remember if it is accessible
>> from GeoMoose).
>> On Jan 6, 2015 7:07 AM, <geo.graefin at web.de> wrote:
>>>
>>> Hello,
>>>
>>> here more in detail what I did:
>>>
>>> 1. I created a new js file including the declaration of the EPSG code
>>> from spatialreference.org and deleted the one of EPSG:26915.
>>> *Proj4js.defs["EPSG:25833"] = "+proj=utm +zone=33 +ellps=GRS80 +units=m
>>> +no_defs";*
>>>
>>> 2. I referenced this new js file in geomoose.html. Beside there is
>>> another projection for the geographic coordinates (EPSG:3857). I deleted
>>> the reference of EPSG:26915.
>>>
>>> *<script type="text/javascript" src="projections/EPSG3857.js"></script>
>>> <script type="text/javascript" src="projections/EPSG25833.js"></script>*
>>>
>>> 3. I changed the parameters projection, max_extent and initial_extent in
>>> mapbook.xml.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *<param name="projection">EPSG:25833</param> <param
>>> name="zoomto"><![CDATA[ { "Zoom To:" : {
>>> "Sachsen und Niederschlesien" : [295743,5511505,709358,5755456]
>>> } } ]]></param> <param
>>> name="max_extent">100000,1000000,999999,9999999</param> <param
>>> name="initial_extent">295743,5511505,709358,5755456</param> <param
>>> name="measure_tool.show_area_segments">false</param> <param
>>> name="layer_controls.legend.on">false</param> <param
>>> name="layer_controls.up.on">false</param> <param
>>> name="layer_controls.down.on">false</param> <param
>>> name="layer_controls.metadata.on">false</param> <param
>>> name="layer_controls.legend.on">true</param> <param
>>> name="group_checkboxes">false</param> <param
>>> name="default_tab">Catalog</param> <param
>>> name="ground_units">m</param> <param
>>> name="maxResolution">156543.03390625</param> <param
>>> name="numZoomLevels">20</param> <param
>>> name="coordinate_display.usng">false</param> <param
>>> name="jumpto_scales"><![CDATA[ { "1:100000" : 100000,
>>> "1:50000" : 50000, "1:24000" : 24000,
>>> "1:10000" : 10000, "1:5000" : 5000 } ]]></param>*
>>>
>>> When I change the coordinates of max_extent then GeoMOOSE shows another
>>> area. Maybe there is the problem? When I set the fractional_zoom to true,
>>> the osm tiles will be displayed pink.
>>>
>>> 4. I changed the projection of the map in local_settings.ini and
>>> settings.ini:
>>>
>>> *[map] projection=EPSG:25833*
>>>
>>> That is what I have done. Is there anywhere a reference to the "old"
>>> projection of EPSG:26915? Anything I have missing?
>>> Unfortunately I have no own data, that I can proof, because there is a
>>> mistake in the map file of the data's source.
>>>
>>> Thanks a lot for your help!
>>>
>>> Greetings, Geograefin
>>> *Gesendet:* Montag, 05. Januar 2015 um 22:16 Uhr
>>> *Von:* "TC Haddad" <tchaddad at gmail.com>
>>> *An:* geo.graefin at web.de
>>> *Betreff:* Re: Re: [Geomoose-users] Change projection
>>>
>>> Let's back up - can you describe your symptoms in more detail?
>>>
>>> - You started from the demo
>>> - You made your projection changes and something didn't work
>>>
>>> - is your data displaying correctly in the map?
>>> - do you get a pink screen when you try to view your data?
>>> - are the coordinates displaying below the map incorrect? or duplicated
>>> in 2 projections?
>>>
>>> More items to double check or try:
>>>
>>> - Did you set appropriate initial and maximum extent values in the
>>> Mapbook?
>>> ie. <param name="max_extent">7110968,-610403,9234765,956456</param>
>>> <param
>>> name="initial_extent">7296650,228568,7570144,408049</param>
>>> - Did you set the correct units in the Mapbook?
>>> <param name="ground_units">ft</param>
>>> - Did you set appropriate zoom levels in the Mapbook?
>>> <param name="fractional_zoom">true</param>
>>> <param
>>> name="scales">0.25,0.5,1,2,4,8,16,32,64,128,256,512,1024,2048</param>
>>>
>>>
>>> On Mon, Jan 5, 2015 at 11:14 AM, <geo.graefin at web.de> wrote:
>>>>
>>>> Thank you for your answer,
>>>>
>>>> I did all the steps, including the both of your answer. I really have
>>>> no idea, what is wrong. Maybe the local_settings.ini could not overwrite
>>>> the settings.ini?
>>>>
>>>> *Gesendet:* Montag, 05. Januar 2015 um 18:10 Uhr
>>>> *Von:* "TC Haddad" <tchaddad at gmail.com>
>>>> *An:* geo.graefin at web.de
>>>> *Betreff:* Re: [Geomoose-users] Change projection
>>>> Some ideas to check if you started from the Demo file:
>>>>
>>>> - Did you place the epsg25833.js file that you created in Step 2 in
>>>> the projections directory?
>>>> - Did you remove the reference to the old projection from your
>>>> HTML? ie.
>>>> delete <script type=”text/javascript”
>>>> src=”projections/EPSG26915.js”></script>
>>>> insert <script type=”text/javascript”
>>>> src=”projections/EPSG25833.js”></script>
>>>>
>>>>
>>>> On Mon, Jan 5, 2015 at 8:35 AM, <geo.graefin at web.de> wrote:
>>>>>
>>>>> Dear community,
>>>>>
>>>>> I have problems with changing the projection of my GeoMOOSE project. I
>>>>> have followed the instructions at the GeoMOOSE site [
>>>>> http://docs.geomoose.org/2.7/docs/projections.html]. In addition to
>>>>> all these steps I changed the EPSG code in local_settings.ini. But there is
>>>>> no effect. It still shows the projection (EPSG code 26915) of the demo, as
>>>>> well as the coordinates x,y at the status bar. The "new" epsg code is 25833.
>>>>> Do you have any ideas, what instructions are missing or what i did
>>>>> wrong?
>>>>>
>>>>> I would be very grateful for help! Thank you in advance!
>>>>>
>>>>> Greetings, Geograefin
>>>>>
>>>>> _______________________________________________
>>>>> Geomoose-users mailing list
>>>>> Geomoose-users at lists.osgeo.org
>>>>> http://lists.osgeo.org/mailman/listinfo/geomoose-users
>>>>
>>>>
>>> _______________________________________________
>>> Geomoose-users mailing list
>>> Geomoose-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/geomoose-users
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20150107/3eb8fcf6/attachment-0001.html>
More information about the Geomoose-users
mailing list