| 01:17:04 | strk: | no way to have PHPMapScript render an imageObject to a PHP variable rather than to a filedescriptor or a file ? |
| 01:20:49 | strk: | the tutorial says "you can do the CGI using MapScript" |
| 01:21:10 | strk: | ok, forget that : ) |
| 02:45:01 | Peut: | is it possible to define variables in the mapfile? |
| 02:45:47 | Peut: | because i would like to use a variable as the value for maxscaledenom/minscaledenom ( so it is the same in multiple layers ) |
| 04:39:11 | ue: | strk, there is a way to render a image create by phpmapscript into a PHP image object |
| 04:39:28 | ue: | strk, I apply watermarks on dynamic content this way |
| 05:26:11 | CIA-80: | assefa * r9559 /sandbox/assefa/: assefa-trunk |
| 06:47:34 | Lucent-S: | i'm looking at GDAL docs, but i don't see how to geotag my own images |
| 06:55:39 | Lucent-S: | specifically i know the bounds of an LCC image and need to assign the metadata |
| 06:57:02 | ue: | http://lists.maptools.org/pipermail/mapserver-west/2005-June/000131.html |
| 06:57:03 | sigabrt: | Title: [Mapserver-west] georeferencing with GDAL ( at lists.maptools.org ) |
| 06:58:38 | bitnerd: | does either 5.6 or trunk include the agg tree? |
| 07:00:21 | AlanB: | bitnerd: yes |
| 07:01:07 | bitnerd: | AlanB: Thanks! |
| 07:09:45 | Lucent-S: | ue, thanks, that seems to be half the battle |
| 07:10:05 | Lucent-S: | so gcp allows me to specify the 4 corners |
| 07:10:50 | Lucent-S: | can i also specify the projection without having to warp it? |
| 07:12:56 | ue: | As I remember, if using gdalwarp you will help to warp it. I think "geotifcp" does what you need "just change the metadata" |
| 07:13:29 | ue: | and "listgeo" from getting that data |
| 07:13:40 | ue: | http://www.remotesensing.org/geotiff/geotifcp.html |
| 07:13:41 | sigabrt: | Title: geotifcp - Copy TIFF, Installing GeoTIFF Metadata ( at www.remotesensing.org ) |
| 07:25:47 | Lucent-S: | so all i have to do is make a file like the plain text at the bottom here? http://www.remotesensing.org/geotiff/listgeo.html |
| 07:25:48 | sigabrt: | Title: listgeo - Dump GeoTIFF Metadata ( at www.remotesensing.org ) |
| 07:25:58 | Lucent-S: | and just fill in Upper Left { xxxx.. and such |
| 07:26:02 | Lucent-S: | and chuck it inside? |
| 08:32:33 | strk: | ue: I know about ImageObj, I was wondering if I could actually output the image into a variable |
| 08:32:36 | strk: | ( rather than stdout ) |
| 08:34:20 | ue: | strk, yes you can |
| 08:34:29 | ue: | sec, but it's a "hack" |
| 08:34:56 | strk: | what do you do with mapscript ? |
| 08:36:30 | ue: | http://pastie.org/711498 |
| 08:36:31 | sigabrt: | Title: #711498 - Pastie ( at pastie.org ) |
| 08:38:21 | strk: | nice |
| 08:38:27 | strk: | didn't know about ob* |
| 10:12:14 | poltrojan: | hello? |
| 10:13:32 | mdev: | howdy |
| 10:13:43 | poltrojan: | whew someoens alive |
| 10:13:56 | poltrojan: | anyways i have a question regarding mapserver if this is the correct IRC |
| 10:13:58 | poltrojan: | channel |
| 10:14:07 | mdev: | it is called mapserver isn't it? |
| 10:14:13 | poltrojan: | right |
| 10:14:23 | poltrojan: | question regarding the EXTENT in LAYER section |
| 10:14:42 | poltrojan: | i have a Gtiff file and trying to map the EXTENT to it |
| 10:14:48 | poltrojan: | that's where I get confused |
| 10:15:29 | FrankW: | poltrojan: can you expand on that? I need to go in a couple minutes, but might be able to help if you hurry. |
| 10:15:41 | poltrojan: | k hold on a sec will copy and past |
| 10:15:44 | poltrojan: | e |
| 10:16:02 | poltrojan: | IMAGETYPE GTiff |
| 10:16:02 | poltrojan: | OUTPUTFORMAT |
| 10:16:02 | poltrojan: | NAME GTiff |
| 10:16:02 | poltrojan: | DRIVER "GDAL/GTIFF" |
| 10:16:02 | poltrojan: | MIMETYPE "image/tiff" |
| 10:16:03 | poltrojan: | IMAGEMODE RGB |
| 10:16:05 | poltrojan: | EXTENSION "tif" |
| 10:16:07 | poltrojan: | END |
| 10:16:08 | FrankW: | ugg |
| 10:16:09 | poltrojan: | |
| 10:16:11 | poltrojan: | EXTENT |
| 10:16:13 | poltrojan: | PROJECTION |
| 10:16:15 | poltrojan: | 'proj=latlong' |
| 10:16:16 | FrankW: | please don't paste lots of lines in URC. |
| 10:16:17 | poltrojan: | 'ellps=WGS84' |
| 10:16:19 | poltrojan: | 'datum=WGS84' |
| 10:16:21 | poltrojan: | 'no_defs' |
| 10:16:23 | poltrojan: | END |
| 10:16:25 | poltrojan: | and map is |
| 10:16:27 | poltrojan: | Corner Coordinates: |
| 10:16:31 | poltrojan: | Upper Left ( 503195.084, 3933775.138 ) ( 116d57'53.10"W, 35d32'51.42"N ) |
| 10:16:33 | poltrojan: | Lower Left ( 503195.084, 3892670.735 ) ( 116d57'53.68"W, 35d10'37.14"N ) |
| 10:16:35 | poltrojan: | Upper Right ( 577362.573, 3933775.138 ) ( 116d 8'47.48"W, 35d32'40.57"N ) |
| 10:16:37 | poltrojan: | Lower Right ( 577362.573, 3892670.735 ) ( 116d 9'1.49"W, 35d10'26.43"N ) |
| 10:16:39 | poltrojan: | Center ( 540278.828, 3913222.936 ) ( 116d33'23.90"W, 35d21'41.38"N ) |
| 10:16:41 | poltrojan: | sorry |
| 10:16:49 | FrankW: | two suggestions. |
| 10:16:51 | poltrojan: | so in EXTENT i thought you match the NW to SE corners, but that didn't work for me |
| 10:17:00 | FrankW: | 1 ) this layer is not lat/long so make sure you specify it's projection properly. |
| 10:17:35 | FrankW: | 2 ) the EXTENT should be "EXTENT 577362.573 3892670.735 577362.573 3933775.138" |
| 10:17:53 | FrankW: | I believe the extent is supposed to be minx miny maxx maxy |
| 10:18:03 | FrankW: | so it should be lower left ( SW ), and upper right ( NE ) corners. |
| 10:18:22 | : | * FrankW takes off. |
| 10:25:24 | poltrojan: | if anyone is still here, can anyone comment what does FrankW meant by 1 ) layer is not lat/long? |
| 10:26:08 | akrherz: | the values are well outside of the bounds for lat/lon values |
| 10:27:10 | poltrojan: | makes sense, right now I am looking at "projection" faq, but can't clue in what to use for that map |
| 10:28:54 | poltrojan: | i see two examples an inline projection parameters or EPSG projection |
| 10:29:45 | danmo: | you'll need to go back to the source of the image and ask what the projection is... or if you're lucky first try running 'gdalinfo' on your tiff file, it may contain projection info already |
| 10:30:08 | poltrojan: | i do have the info, just a sec |
| 10:31:23 | poltrojan: | Coordinate System is: |
| 10:31:23 | poltrojan: | PROJCS["unnamed", |
| 10:31:23 | poltrojan: | GEOGCS["WGS 84", |
| 10:31:23 | poltrojan: | DATUM["WGS_1984", |
| 10:31:23 | poltrojan: | SPHEROID["WGS 84",6378137,298.2572235630016, |
| 10:31:24 | poltrojan: | AUTHORITY["EPSG","7030"]], |
| 10:31:25 | danmo: | please don't paste here!!! |
| 10:31:26 | poltrojan: | AUTHORITY["EPSG","6326"]], |
| 10:31:28 | poltrojan: | PRIMEM["Greenwich",0], |
| 10:31:32 | poltrojan: | UNIT["degree",0.0174532925199433], |
| 10:31:34 | poltrojan: | AUTHORITY["EPSG","4326"]], |
| 10:31:36 | poltrojan: | PROJECTION["Transverse_Mercator"], |
| 10:31:38 | poltrojan: | PARAMETER["latitude_of_origin",0], |
| 10:31:44 | poltrojan: | PARAMETER["central_meridian",-117], |
| 10:31:44 | poltrojan: | PARAMETER["scale_factor",0.9996], |
| 10:31:44 | poltrojan: | PARAMETER["false_easting",500000], |
| 10:31:46 | danmo: | use http://pastebin.ca/ |
| 10:31:46 | poltrojan: | PARAMETER["false_northing",0], |
| 10:31:47 | sigabrt: | Title: pastebin - Type, paste, share. ( at pastebin.ca ) |
| 10:31:52 | poltrojan: | UNIT["metre",1, |
| 10:31:52 | poltrojan: | AUTHORITY["EPSG","9001"]], |
| 10:31:52 | jmckenna: | poltrojan: please use http://pastebin.ca/ |
| 10:31:56 | poltrojan: | AUTHORITY["EPSG","32611"]] |
| 10:31:56 | poltrojan: | too late |
| 10:31:56 | poltrojan: | how come you can't paste? |
| 10:32:08 | danmo: | that's called flooding |
| 10:32:34 | danmo: | this is IRC... and it is a poor practice to paste large blobs of test in IRC |
| 10:32:39 | danmo: | *text |
| 10:33:14 | poltrojan: | >.> sorry, will avoid that in future here |
| 10:33:27 | poltrojan: | http://pastebin.ca/1684066 |
| 10:33:28 | sigabrt: | Title: pastebin - Miscellany - post number 1684066 ( at pastebin.ca ) |
| 10:33:28 | mdev: | just out of curiousity... up to how many lines is considered acceptable to paste? |
| 10:33:36 | AlanB: | mdev: 2 |
| 10:33:39 | mdev: | ok |
| 10:33:40 | AlanB: | ; ) |
| 10:34:02 | jmckenna: | ha |
| 10:34:17 | AlanB: | there is no limit... but .. I think 5 is enough to be considered a flood. |
| 10:34:58 | jmckenna: | poltrojan: sorry, i missed your conversation with frank. what is your question about this projection? |
| 10:35:13 | poltrojan: | how do i determine the projection for the map |
| 10:35:16 | danmo: | poltrojan: your image seems to be in EPSG:32611 projection |
| 10:35:36 | poltrojan: | dammo:thx so don't use the wgs84 latlong combo? |
| 10:35:49 | danmo: | so you could use "PROJECTION 'init=epsg:32611' END" in your layer definition in your mapfile |
| 10:36:32 | danmo: | you should not need to specify extent explicitly in the layer. If I'm not mistaken, MapServer will read it directly from the image ( but it does not read the projection automatically unfortunately ) |
| 10:36:36 | jmckenna: | ...if you even require a projection object ( as noted at bottom of http://www.mapserver.org/mapfile/projection.html ) |
| 10:36:37 | sigabrt: | Title: PROJECTION MapServer 5.4.2 documentation ( at www.mapserver.org ) |
| 10:37:40 | : | * jmckenna projection issues are more exciting than my current task - recording expenses for months! |
| 10:38:27 | poltrojan: | I just looked over the PROJECTION section in mapserver.org website, just wasn't 100% sure |
| 10:39:34 | danmo: | you know you're onto something really boring when projection issues start to sound exciting : ) |
| 10:39:46 | poltrojan: | how does one determine that epsg is 32611 when i see at least 9001, 32611, 7030, 6326, 4326 |
| 10:40:04 | danmo: | EPSG:9001 is the code for units meters |
| 10:40:44 | danmo: | the others are probably the spheroid id and the datum id |
| 10:41:12 | poltrojan: | ah i see what you mean now |
| 10:41:32 | poltrojan: | datum, spheroid, primem, and last one is unit |
| 10:43:38 | poltrojan: | brb going to test this out |
| 10:50:24 | ted_s: | hi guys ... does TOLERANCE in the layer object applies only to point and line features ? |
| 10:50:55 | danmo: | nope. it works also for polygon features |
| 10:51:30 | poltrojan: | ok that didn't work |
| 10:51:40 | poltrojan: | hold on let me give you full contents of map and file for layers |
| 10:52:06 | ted_s: | ok .. cool ... is it using the centroid, center of geometry, nearest point on the polygon to calculate? anyone know? |
| 10:53:01 | danmo: | it adds the given TOLERANCE value as a buffer around the polygon outline when you do a query |
| 10:54:31 | danmo: | ted_s: perhaps describe what you are trying to do. I'm not sure I am answering the right question |
| 10:55:05 | ted_s: | thnks ... so if i itemfeaturequery a polygon layer A to find polygons in polygon layer B, do I put the tolerance value in layer A or Layer B? |
| 10:56:22 | poltrojan: | map info file >> http://pastebin.ca/1684137 || the map defenition itself with gdalinfo >> http://pastebin.ca/1684139 |
| 10:56:26 | sigabrt: | Title: pastebin - Someone - post number 1684137 ( at pastebin.ca ) |
| 10:56:43 | ted_s: | I am trying to find parcels ( polygons layer B ) that are within a radius of a polygon in polygons layer A |
| 10:57:07 | danmo: | If what you want the tolerance to be added as a buffer around the feature from layer A while querying layer b, then I'd say set the tolerance in layer b since that's the layer that you query using the tolerance, but could be wrong as I have not used itemfeaturequery in a while |
| 10:58:06 | danmo: | poltrojan: a couple of issues |
| 10:58:27 | poltrojan: | dammo: thank you, i can't seem to locate them |
| 10:58:36 | danmo: | the init=epsg:32611 should go inside the layer since it is there to define the projection of the source data |
| 10:59:01 | ted_s: | ok... done that and as long as I set the tolerance to 0 in layer B, it finds the adjacent polygons in layer B correctly |
| 10:59:43 | danmo: | However, if you are going to use the same projection in the layer defn and as output for your map ( the top-level projection object ), then you are effectively not reprojecting... in which case you could avoid the projection definitions completely |
| 10:59:47 | ted_s: | but when I set the tolerance to > 0, MS does produce expected results.... I suspect it could be related to map/layer/projection units |
| 10:59:54 | ted_s: | and tolerance units as well |
| 11:00:02 | danmo: | that's what jmckenna alluded to when he wrote "...if you even require a projection object ( as noted at bottom of http://www.mapserver.org/mapfile/projection.html )" |
| 11:00:04 | sigabrt: | Title: PROJECTION MapServer 5.4.2 documentation ( at www.mapserver.org ) |
| 11:00:17 | jmckenna: | true, true |
| 11:00:32 | danmo: | ted_s: yes, TOLERANCEUNITS matter |
| 11:02:59 | ted_s: | the layer I am setting TOLERANCEUNITS on is epsg:2278 which is in feet, and i am setting TU in feet ... MAP UNITS are DD ... see anything wrong with that? |
| 11:05:48 | poltrojan: | danmo: so once projection for all as in multiple maps and one projection for each layer if multiple layer exists, i hope i got that right |
| 11:05:56 | poltrojan: | considering I will have to add more than one map, but right now struggling with one |
| 11:06:54 | jmckenna: | poltrojan: this is explained at bottom of http://www.mapserver.org/mapfile/projection.html |
| 11:06:55 | sigabrt: | Title: PROJECTION MapServer 5.4.2 documentation ( at www.mapserver.org ) |
| 11:07:38 | poltrojan: | jmckenna: i did read it, just trying to confirm it myself if I understood it correctly |
| 11:20:12 | CIA-80: | aboudreault * r9560 /trunk/mapserver/ ( HISTORY.TXT maplexer.c maplexer.l ): Fixed long expression evaluation ( #2123 ) |
| 11:23:38 | danmo: | ted_s: as long as your layer units match the projection of the source data and the overall map units match of the output map projection you should be fine |
| 11:26:26 | ted_s: | danmo: thanks ... I'll confirm my projection units again .... just pasted the map file http://pastebin.ca/1684168 just in case... maybe there is a better approach? Summary : Query layer A with an objectid to find a polygon, then use the polygon layer A geometry to find the polygons in layer B WHERE distance <= TOLERANCE |
| 11:26:27 | sigabrt: | Title: pastebin - ted_s - post number 1684168 ( at pastebin.ca ) |
| 11:29:38 | danmo: | ted_s: what is not working? Is it just that the buffer around polygon from layer A is not of the expected size? |
| 11:30:02 | danmo: | your source data appears to be in epsg:2278, which is LCC in feet, right? |
| 11:30:13 | danmo: | Then perhaps try setting UNITS FEET inside your layers as well |
| 11:30:39 | ted_s: | ah ... ok ... havent thought of that |
| 11:30:58 | ted_s: | and yes... just the buffer is not the expected size |
| 11:31:36 | poltrojan: | oh i've been meaning to ask |
| 11:31:45 | poltrojan: | UNITS DD meaning |
| 11:31:47 | poltrojan: | ?? |
| 11:31:54 | ted_s: | DECIMAL DEGREES |
| 11:32:02 | poltrojan: | merci |
| 11:33:34 | poltrojan: | i still haven't got mine to work but will run some test tomorrow, thank you for your assistance |
| 11:46:26 | ted_s: | danmo: tried setting UNITS FEET in LAYER B, then also in LAYER A, ... same result .. still returning adjacent parcels ... |
| 11:46:43 | ted_s: | checking the projection .... it is actually State Plane of South Texas ( Zone 4204 ) and Datum NAD 1983 |
| 11:48:02 | ted_s: | I guessed at epsg:2278 b/c that seemed correct ... any quick way to reference the STATE PLANE coord system to epsg codes? |
| 11:50:59 | mdev: | hi does anyone know of a way to correlate map feature size to maxscaledenom... Basically I would like to make maxscaledenom be proportionate to a feature's prevelence... larger featuers have a larger maxscaledenom size and dissappear at wider zoom views |
| 11:51:16 | danmo: | ted_s: Sounds like a case of spatialreference.org: http://spatialreference.org/ref/?search=state+plane+texas |
| 11:51:17 | sigabrt: | Title: Spatial Reference List -- Spatial Reference ( at spatialreference.org ) |
| 11:51:39 | danmo: | mdev: by feature size you mean fonts and symbols? |
| 11:51:54 | mdev: | lines too, but yeah |
| 11:51:59 | mdev: | let's say I plot a route |
| 11:52:06 | ted_s: | htanks danmo |
| 11:52:28 | mdev: | one route is france -> germany and another is france to south america... the short route should dissappear off map when zooming out sooner than the longer route |
| 11:52:44 | mdev: | cause you need to zoom out to see the longer route but having the little route still hanging around would be in the way |
| 11:54:44 | danmo: | mdev: sounds like you need an equivalent of LABEL/MINFEATURESIZE but applied to features being drawn and not just to labels? |
| 11:55:08 | danmo: | I see an open enhancement ticket about this: http://trac.osgeo.org/mapserver/ticket/1340 |
| 11:55:09 | sigabrt: | Title: #1340 ( minfeaturesize support at layer or class level ) - MapServer - Trac ( at trac.osgeo.org ) |
| 11:55:46 | mdev: | well yeah... maxscaleddenom |
| 11:56:07 | mdev: | I have it and it works fine now... the problem is I don't always want to pass the same scale to it |
| 11:56:23 | mdev: | I need a way to adjust the scale I pass to it depending on the span of the lines/features |
| 11:57:20 | mdev: | I'm using mapscript so I CAN dynamically set the maxscaledenom... Without a doubt it's simple programming here... but I'm wondering how I can compare the scaledenom between two features |
| 11:58:03 | danmo: | MINFEATURESIZE applies to the actual shapes... for instance, setting it to 20 pixels will skip any features smaller than 20 pixels... this is essentially what you want if I'm not mistaken |
| 11:58:03 | mdev: | is there a way to quickly/easily calculate what the scale of a particular feature is? then I can set the scaledenom at a multiplier of that? so features would get dropped proportionate to their size compared to other feautres |
| 11:58:25 | danmo: | scale applies to map, not features |
| 11:58:29 | ted_s: | danmo: changed to epsg:102740, even set scalebar units to feet ... still no joy |
| 11:58:39 | mdev: | oh perhaps that could work, let me try it out |
| 11:58:41 | mdev: | thanks |
| 11:59:15 | danmo: | mdev: minfeaturesize is not implemented yet for filtering out lines/polygons... it works only for labels at the moment |
| 11:59:26 | danmo: | hence my ref to the enhancement ticket above |
| 11:59:26 | mdev: | oh darn! |
| 11:59:40 | mdev: | what are the other options then? |
| 12:00:25 | danmo: | if you can process the data and set a "size" attribute based on computed feature size you could then filter the layer based on size |
| 12:00:48 | mdev: | how do I find out the feature size? |
| 12:01:00 | danmo: | ted_s: scalebar units shouldn't matter. it's really the layer units that should matter |
| 12:01:18 | danmo: | mdev: you'd need to compute it outside of MapServer |
| 12:01:34 | mdev: | ok, but what's the best way to do it? |
| 12:01:41 | danmo: | there is none |
| 12:01:56 | danmo: | ( I mean there are some, but you need to do some research ) |
| 12:01:58 | mdev: | find the two points furthest apart? subtract to find how many degrees between them, convert into miles? |
| 12:02:11 | mdev: | set a scale based on that? |
| 12:02:11 | ted_s: | got it ... mdev: have you tried returning scale into your template and then zooming in and out manually? and writing down the scale you like for each and then setting maxscaledenom in the layers? |
| 12:02:20 | mdev: | yes |
| 12:02:24 | mdev: | I have |
| 12:02:26 | mdev: | that works great |
| 12:02:30 | mdev: | but I need it to be dynamic |
| 12:02:43 | mdev: | if someone submits a bigger route vs a small local route |
| 12:02:52 | mdev: | they have to dissappear proportionate to their size |
| 12:03:07 | mdev: | and minfeaturesize sounded excellent until i found out it didn't work for lines |
| 12:03:54 | mdev: | so is the only way to do it to calculate the greatest distance between points in the polygon, and use a multiplier to set the scale from that? |
| 12:04:17 | mdev: | how do I know what scale I have to be at to have the entire polygon fit a map at a scale of 1:1 ( polygon: map ) |
| 12:04:33 | mdev: | without using guess and check as ted_s pointed out |
| 12:06:21 | mdev: | yeah it sounds to me like the answer lies in knowing the scale required to fit the entire feature on a map and comparing that to other features... I understand how to go about all that but how do I find out dynamically what scale is needed to show 100% of a given feature? |
| 12:07:14 | ted_s: | could you use mapext=shape somehow, then get that scale and re-draw your map? ... i'm not well versed on mapscript |
| 12:11:36 | mdev: | I suppose but that could get quite CPU intensive if there are many features I suspect |
| 12:12:24 | mdev: | is there any function similar to: $map->scaledenom; for checking the scaledenom of a feature? |
| 12:15:06 | danmo: | mdev: features do not have scale |
| 12:15:29 | danmo: | scale is the map to ground ratio .. it belong to the map, not to the features |
| 12:15:44 | danmo: | e.g. scale of 1:20,000 means one units in the map is 20,000 units on teh ground |
| 12:16:24 | danmo: | the kind of filtering you want needs to be done based on feature size, not feature scale ( since features have a size, not a scale ) |
| 12:16:43 | danmo: | from the size you can derive a range of map scales at which you want the feature to appear |
| 12:16:58 | mdev: | makes sense |
| 12:17:03 | mdev: | that's what I'm working on figuring out |
| 12:21:34 | danmo: | A ( kind of ) simple solution would be to compute the size of diagonal of the bbox of every feature in your layer and set that in a size attribute ( could do that with mapscript, postgis, or whatever ) |
| 12:22:09 | mdev: | how do you get that distance though> |
| 12:22:42 | danmo: | then you could have 3 layers ( or a layer with 3 classes ) with different filter expressions based on the size attribute, and each one would use a different scale range |
| 12:23:08 | danmo: | diagonal_length = sqrt( dx² + dy² ) |
| 12:23:55 | danmo: | dx = xmax-xmin , dy = ymax-ymin |
| 12:26:11 | mdev: | but how do you find the xmax, min, etc... without looping through all points and comparing? |
| 12:26:41 | danmo: | you'd have to loop through all features, etc... yes, that's quite a bit of work |
| 12:27:05 | danmo: | the alternative is to wait for http://trac.osgeo.org/mapserver/ticket/1340 in a future release |
| 12:27:06 | sigabrt: | Title: #1340 ( minfeaturesize support at layer or class level ) - MapServer - Trac ( at trac.osgeo.org ) |
| 12:27:21 | danmo: | that's why I wrote earlier that there is no way... |
| 12:27:41 | mdev: | do you think the improvement would be significanlty faster than the method we just discussed? |
| 12:27:46 | mdev: | if it isn't i may as well just go right for it |
| 12:27:55 | mdev: | if it would basically do it the same way... |
| 12:28:46 | danmo: | the improvement would be built into mapserver. it would be simpler to use and about as efficient |
| 12:29:24 | danmo: | the ticket would not be done the way I suggested... what I suggested was a way around the fact that the feature does not exist |
| 12:30:47 | mdev: | I understand that... but if it did, do you suppose it would use a similar method requiring looping or would it know the stuff quicker and be able to do a more efficient calculation |
| 12:31:54 | danmo: | The bbox of features is already known/computed when they are read for rendering, so it's only a matter of adding a test at the right places. |
| 12:32:51 | mdev: | BTW, can this method we discussed be used in DD units? |
| 12:33:00 | mdev: | or does it have to be a statute unit? |
| 12:34:22 | danmo: | it would work with DD... just that degrees is not the best unit of measure because as you get away from the equator, degrees of longitude become smaller and smaller |
| 12:35:04 | mdev: | yes... but the point I have are known in DD, I can calculate DD distance between them |
| 12:35:12 | danmo: | yes |
| 12:35:17 | mdev: | can mapserver give me the statute distance between two points? |
| 12:35:22 | danmo: | they're just x and y in the end |
| 12:35:25 | danmo: | no |
| 12:35:32 | mdev: | so I'm stuck going DD? |
| 12:36:12 | mdev: | I guess I don't need a perfect scaling so the amount of scaling error as the result of distance changing away from equator should be insignificant... I just need approximate scaling that appears proportionate |
| 12:36:22 | danmo: | correct |
| 12:36:30 | mdev: | ok, very good |
| 12:36:33 | mdev: | I will get to work on this |
| 12:36:42 | danmo: | have fun |
| 12:36:46 | mdev: | if the end script is something you are interested in, let me know and I can postit on the wiki |
| 12:37:51 | danmo: | Some users may see a use for it, not sure. However the proposed enhancement ( ticket above ) would be directly in the C code and would be cleaner |
| 12:38:11 | mdev: | you wrote the code for it already? |
| 12:39:58 | danmo: | No, not yet |
| 12:40:22 | danmo: | if I had the code I would have told you already |
| 12:40:38 | mdev: | ah ok |
| 12:40:39 | mdev: | no prob |
| 12:40:43 | mdev: | I'll write the script then |
| 12:40:48 | danmo: | np |
| 12:40:59 | mdev: | sounds like an important feature and its a bummer it doesnt exist |
| 12:42:36 | danmo: | they're all important features when we need them and they're not available : ) |
| 12:42:59 | mdev: | yup |
| 12:53:36 | mdev: | hey, someone familiar with geography, could ou tell me what scale unit my map is using if the scale of all of europe is 1:23,682,878 |
| 12:58:12 | bitnerd: | scale is unitless, one unit on the ground whatever that unit is is equivalent to one unit on the ground |
| 12:58:33 | bitnerd: | *on the map* |
| 12:59:09 | bitnerd: | boy that came our poorly |
| 12:59:49 | bitnerd: | 1:23,682,878 means that if you measure one inch on the map, it is 23,682,878 inches on the ground |
| 13:00:12 | mdev: | sure thing |
| 13:00:17 | bitnerd: | similarly if you measure 1cm on the map, it is 23,682,878cm on the ground |
| 13:00:23 | mdev: | so are you saying that I'm most likely looking at a scale of inches |
| 13:00:29 | mdev: | I know I am saying I know that my span is all of europe |
| 13:00:41 | mdev: | and I know the reported scale is 23,682,878 |
| 13:00:42 | bitnerd: | scale is unitless is what I am telling you |
| 13:01:09 | mdev: | well given that this is the scale for a size of europe, what unit is that scale most likely based on |
| 13:01:12 | mdev: | I'm going backwards here |
| 13:01:33 | bitnerd: | what matters is both the physical size of your map and the size it is depicting |
| 13:01:49 | mdev: | I set mapserver to use MS_DD but I'm not sure why the scale is 23,000,000 |
| 13:01:56 | bitnerd: | scale is inherently *not* based on units |
| 13:01:59 | mdev: | 23,000,000 what? |
| 13:02:11 | strk: | 23M whats |
| 13:02:20 | mdev: | big help |
| 13:02:21 | mdev: | lol |
| 13:02:25 | bitnerd: | scale has *no* units |
| 13:02:26 | strk: | any what you measure on the screen is 23M whats on earth |
| 13:02:34 | mdev: | oh |
| 13:02:35 | strk: | whatever |
| 13:02:44 | strk: | a meter on screen is 23M meters on earth |
| 13:02:55 | strk: | a bathtube on screen is 23M bathtubes on earth |
| 13:03:00 | mdev: | btu if my map units is DDs? |
| 13:03:02 | bitnerd: | a furlong on the screen is 23M furlongs |
| 13:03:12 | mdev: | ok, i get your example |
| 13:03:32 | mdev: | but how can a unit be DD? |
| 13:03:36 | mdev: | what is a DD? |
| 13:03:40 | strk: | decimal degree |
| 13:03:42 | mdev: | if I have a distance of 5DDs |
| 13:03:46 | mdev: | what is 5DDs |
| 13:03:47 | strk: | it's an angle |
| 13:03:55 | mdev: | so how does it compare to scale? |
| 13:04:00 | strk: | doesn't |
| 13:04:11 | mdev: | what could I do to compare it to scale? |
| 13:04:16 | strk: | nothing |
| 13:05:03 | mdev: | is there a system for converting the distance between two DDs based on LAT/LONG to a distance that can be scaled? |
| 13:10:31 | strk: | what you mean by "scaled" ? |
| 13:11:42 | mdev: | ok, ignore scaled |
| 13:11:52 | mdev: | how can I get the distance between two geo points on a map? |
| 13:12:40 | strk: | are the points stored in postgis ? |
| 13:13:08 | mdev: | no, I have them in a php mapscript |
| 13:13:13 | mdev: | I can do php functions on them |
| 13:14:01 | strk: | know pitagora's theoreme ? |
| 13:14:33 | mdev: | should I use Haversine forumula? |
| 13:14:34 | mdev: | http://www.movable-type.co.uk/scripts/latlong.html |
| 13:14:45 | sigabrt: | Title: Calculate distance and bearing between two Latitude/Longitude points using Haversine formula in JavaScript ( at www.movable-type.co.uk ) |
| 13:15:29 | strk: | I dunno that formula but might be good if coordinates are in lat/long |
| 13:15:51 | mdev: | yeah, that's what I'm going to try using |
| 13:16:05 | mdev: | there's no built in function of that in mapserver so I don't have to reinvent the wheel? |
| 13:17:13 | strk: | there's a built in function in postgis, don't think mapserver does that kind of things |
| 13:17:47 | mdev: | ok |
| 13:17:54 | mdev: | I'll make a php script to do it then |
| 13:17:57 | mdev: | thanks |
| 13:18:45 | strk: | consider proposing that for addition into mapscript ( I'd love to see mapscript growing in utilities ) |
| 13:20:45 | mdev: | in the wiki examples or as a built in function? |
| 13:21:57 | strk: | I've no voice on that, guess wiki example will be an excellent start |
| 13:22:56 | mdev: | ok, sure thing |
| 23:26:54 | strk: | uhm, is there a limit on LAYER DATA length ? |
| 23:27:14 | strk: | it seems my 'using unique' and 'using SRID' aren't being used |
| 23:28:07 | strk: | LAYER DATA "boundary from ( ' . $query .' ) as foo using unique id using SRID 4326" END |
| 23:28:26 | strk: | error is: |
| 23:28:43 | strk: | Error ( ERROR: find_srid( ) ... ) |
| 23:33:53 | strk: | ah, using SRID= : ) |