Most inverters will handle a +50% inrush for about a second before complaining and shutting down.
Personally I run a 3 kilowatt inverter in my pickup, I spend a lot of time in the boonies and frequently find it quite helpful to have enough power onboard to run whatever load I choose. I have run my Sears 5hp air compressor from this inverter.
The alternator does not have to supply enough current to run the inverter - as long as your load is intermittent, the battery will make up the difference and when the load drops off, the alternator will recharge the battery. Keep in mind that your AC electrical load is not likely to be 100% efficient (exception is a resistance heater), and your inverter is not 100% efficient either - 90% is typical for units this size. Plan your wire runs to/from the battery with this in mind.
The suggestion for a second dedicated battery driving the inverter and charging off the vehicle alternator is a good one - that's the way mine is set up, using #2 welding cable for hot supply and frame ground with copper strap. I use a constant-duty solenoid to tie the two batteries together as long as the engine is running, when I kill the ignition the solenoid drops out. This prevents me from draining my primary vehicle battery via the inverter.
It should be noted as well that a 5hp motor, at a conversion factor of 758 watts per hp, would draw almost 3800 watts - but that is only at full load. Usually a 5-hp compressor is not pulling a full 5hp from the motor, more like 3.5 or therabouts, and the running current draw is less. I would be willing to bet that your 1500 watt inverter will run your 2hp compressor just fine - just take measures to ensure good power supply to the inverter.