Opened 13 years ago
Closed 13 years ago
#84 closed defect (fixed)
select.php and buffer_select services need to be aware of units
Reported by: | bfischer | Owned by: | theduckylittle |
---|---|---|---|
Priority: | major | Milestone: | 2.6 |
Component: | GeoMOOSE/PHP | Version: | 2.6 |
Keywords: | Cc: |
Description ¶
These services should ensure they are using the units set in the mapbook by default or possibly be overridden by a variable that is passed into the service from the client.
Change History (34)
comment:1 by , 13 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:2 by , 13 years ago
Status: | assigned → testing |
---|
comment:4 by , 13 years ago
Inclusion in the demo mapbook.xml is a great documentation options. Would http://geomoose.org/trunk/docs/configuration.html be another appropriate place for this?
Attached patch adds units="ft" in select and buffer_select services in default mapbook.xml and param name="measure_tool.*" options from #80 too.
by , 13 years ago
Attachment: | mapbook.xml.patch added |
---|
comment:5 by , 13 years ago
Status: | testing → needs_work |
---|
In my testing I can't seem to get this to produce the right results. I am working with a custom MN County coordinate system. Could the issue be that the select.php service doesn't recognize the custom coordiante system. Or I simply doing something wrong. Attached is my mapbook and a couple screen shots of the settings and results. The attached example should buffer the selected parcel by 1000 ft and then select all other parcels within that 1000 foot buffer. Instead I am getting an irregular buffer shape and the distance when I measure it is not 1000 feet. I get similar results when I try to buffer a graphic.
Eli, did you get this to work with the demo?
by , 13 years ago
Attachment: | buffer settings screenshot.png added |
---|
comment:6 by , 13 years ago
Status: | needs_work → testing |
---|
Brian, did you remember that the output is always meters?
So the service will be getting meters. I'd imagine that what's happening is that you're sending it meters and it's buffering 304 ft.
by , 13 years ago
Attachment: | buffer results screenshot.png added |
---|
comment:7 by , 13 years ago
Dan, I'm not following you here. Why would the service being using meeters when the coordinate system is in feet? If it's returning the results in meters how do we make it fit on a map that is in feet ground units? Maybe I'm missing something here, but not makeing sense to me.
comment:9 by , 13 years ago
So does this mean that this is not going to work for me if the coordinate system is not in meters?
comment:10 by , 13 years ago
It depends on the other configuration settings. Theoretically, all the "math" for a buffer is done in WGS85 and UTM. I can add an option to have the length type output the same units as the map.
comment:11 by , 13 years ago
I think we might need that otherwise I'm not sure how people that want to use other coordinate systems would make the buffer tools work. For example in my case with a MN County coordinate system. My mapefiles attached in case I am missing a parameter to make this work.
We should also probably add a note somewhere that the buffer tools are not going to be supported with geographic coordinates systems (lat/long) only planar coordinate systems. Unless I'm wrong with that assumption.
comment:12 by , 13 years ago
(dig) If someone is using geographic coordinate systems then they have other problems. (/dig) I'll look into it.
Did you setup a "fake" EPSG code for your coordinate system? If so, did you set it in local_settings.ini?
comment:13 by , 13 years ago
Yep, setup custom coordinate system. I'll attach that file. Yes, it's added to settings.ini and mapbook.
by , 13 years ago
Attachment: | EPSG110000.js added |
---|
comment:14 by , 13 years ago
Looking at your attached mapbook.xml, I don't see this configured (units="ft").
Line 317: <input type="length" name="shape_buffer" title="Buffer Features By: "/>
I would expect: <input type="length" name="shape_buffer" title="Buffer Features By: " units="ft"/>
Line 344: <input type="length" name="selection_buffer" title="Buffer Selection Shape">0</input>
I would expect: <input type="length" name="selection_buffer" title="Buffer Selection Shape" units="ft">0</input>
comment:15 by , 13 years ago
comment:16 by , 13 years ago
I think I migth have uploaded a old version of the mapbook. Attached is the latest. Also if you want to play with the site it is at http://douglas.houstoneng.net/douglas/douglas.html.
by , 13 years ago
Attachment: | mapbook.2.xml added |
---|
comment:17 by , 13 years ago
Status: | testing → needs_work |
---|
comment:18 by , 13 years ago
Status: | needs_work → testing |
---|
r801 - Length input types now honor native map coordinates. So the units will match the display coordinate system.
comment:19 by , 13 years ago
Brian, I've not tried this in the demo with a custom projection yet.
Dan, did you look at comment 4 for applying the patch to make this more documented in the mapbook?
comment:20 by , 13 years ago
Tested this out a bit as follows:
Select
- Selected with polygon and buffer of 20 feet.
- Went to maesure line. set unit to feet.
- Measure buffer distance. It was 20 feet (or as close as I could get)
Buffer
- Select a parcel
- Buffered 50 feet
- Went to maesure line. set unit to feet.
- Measure buffer distance. It was 50 feet (or as close as I could get)
This is Brian's ticket but it looks good to me.
comment:21 by , 13 years ago
Component: | GeoMOOSE/PHP → GeoMOOSE/JS |
---|
comment:22 by , 13 years ago
Component: | GeoMOOSE/JS → GeoMOOSE/PHP |
---|
Odd... I was trying to change ticket 104.
comment:23 by , 13 years ago
Status: | testing → needs_work |
---|
I still can't get this to work using a MN County Coordinate system. I think I have all the mapbook settings correct but can't tell for sure. Attached is my result from this operation.
1) Use the Select by Graphic tool
2) Use the Draw Line option
3) Set the buffer to 2000
I get similar results when I try to use the "Select with Buffer" tool.
Attached is my mapbook, settings.ini and screen shot of the results.
URL is at http://douglas.houstoneng.net/douglas/douglas.html
Does this issue lie within GeoMoose not knowing about a custom coord or do I have my mapbook definitions incorrect?
by , 13 years ago
Attachment: | settings.ini added |
---|
comment:26 by , 13 years ago
Status: | needs_work → testing |
---|
Okay, I modified this in r832 and ran through the logic for the re-projection code.
Make sure the Mapfile from which the features are being selected (like "parcels.map") have a project defined in the MAP and preferably at the LAYER level.
Also, PLEASE STOP MODIFY SETTINGS.INI. USE LOCAL_SETTINGS.INI.
comment:27 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | testing → closed |
This seems to be working now. Closing ticket.
Okay, I've got this working. I added a new input type called "length." Length will render both an input box and a units-select drop down. Right now it uses the "measure_tool.line_units" as the default units for these drop downs.
You can also manually specify the unit type in the service definition. For example...
Someone should document this...