Opened 12 years ago

Closed 12 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.

Attachments (7)

mapbook.xml.patch (1.4 KB ) - added by EliL 12 years ago.
patch to add units="ft" and measure_tool.* into mapbook.xml #80, #84
buffer settings screenshot.png (11.0 KB ) - added by bfischer 12 years ago.
buffer results screenshot.png (148.5 KB ) - added by bfischer 12 years ago.
EPSG110000.js (376 bytes ) - added by bfischer 12 years ago.
mapbook.2.xml (19.0 KB ) - added by bfischer 12 years ago.
mapbook.xml (19.0 KB ) - added by bfischer 12 years ago.
Mapbook.xml - 06122012_testing
settings.ini (1.5 KB ) - added by bfischer 12 years ago.

Download all attachments as: .zip

Change History (34)

comment:1 by theduckylittle, 12 years ago

Owner: set to theduckylittle
Status: newassigned

comment:2 by theduckylittle, 12 years ago

Status: assignedtesting

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...

 <input type="length" name="shape_buffer" title="Buffer Features By: " units="mi"/>

Someone should document this...

comment:3 by theduckylittle, 12 years ago

Oops ... r792

comment:4 by EliL, 12 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 EliL, 12 years ago

Attachment: mapbook.xml.patch added

patch to add units="ft" and measure_tool.* into mapbook.xml #80, #84

comment:5 by bfischer, 12 years ago

Status: testingneeds_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 bfischer, 12 years ago

comment:6 by theduckylittle, 12 years ago

Status: needs_worktesting

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 bfischer, 12 years ago

comment:7 by bfischer, 12 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:8 by theduckylittle, 12 years ago

Because the "length" type doesn't know or care about the projection.

comment:9 by bfischer, 12 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 theduckylittle, 12 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 bfischer, 12 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 theduckylittle, 12 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 bfischer, 12 years ago

Yep, setup custom coordinate system. I'll attach that file. Yes, it's added to settings.ini and mapbook.

by bfischer, 12 years ago

Attachment: EPSG110000.js added

comment:14 by EliL, 12 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 EliL, 12 years ago

The screenshot of your buffer results looks wrong. I'm not sure if it is related to using the correct units. Perhaps you are seeing something that is related to #89 (see screenshot) or an incorrect selection #95.

comment:16 by bfischer, 12 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 bfischer, 12 years ago

Attachment: mapbook.2.xml added

comment:17 by theduckylittle, 12 years ago

Status: testingneeds_work

comment:18 by theduckylittle, 12 years ago

Status: needs_worktesting

r801 - Length input types now honor native map coordinates. So the units will match the display coordinate system.

comment:19 by EliL, 12 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 andersd, 12 years ago

Tested this out a bit as follows:

Select

  1. Selected with polygon and buffer of 20 feet.
  2. Went to maesure line. set unit to feet.
  3. Measure buffer distance. It was 20 feet (or as close as I could get)

Buffer

  1. Select a parcel
  2. Buffered 50 feet
  3. Went to maesure line. set unit to feet.
  4. 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 jimk, 12 years ago

Component: GeoMOOSE/PHPGeoMOOSE/JS

comment:22 by jimk, 12 years ago

Component: GeoMOOSE/JSGeoMOOSE/PHP

Odd... I was trying to change ticket 104.

comment:23 by bfischer, 12 years ago

Status: testingneeds_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 bfischer, 12 years ago

Attachment: mapbook.xml added

Mapbook.xml - 06122012_testing

comment:24 by theduckylittle, 12 years ago

Are you using trunk/the latest nightly?

by bfischer, 12 years ago

Attachment: settings.ini added

comment:25 by bfischer, 12 years ago

Yes, using Revision 829.

comment:26 by theduckylittle, 12 years ago

Status: needs_worktesting

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 bfischer, 12 years ago

Resolution: fixed
Status: testingclosed

This seems to be working now. Closing ticket.

Note: See TracTickets for help on using tickets.